Hi @Faizan_Kamal, what SDK and version are you using? Were you able to debug to make sure that the logging code in your activities is executed when you say it’s not showing?
What do you mean with clear server cache? Do you mean in development env (Docker-compose)?
Issue which i am facing is for some activities, attempt number from Activity Execution context is coming as 2 though its getting executed for first time.
My initial guess would be that you are assigning it to a class variable maybe? Note that you are registering a single activity implementation with the worker which is reused so it would be best to call this method every time inside your activity method code.
Also note that workflow history does not show every activity retry attempt (to keep the history smaller in case you have a ton of retries), so let’s say that your activity retried 4 times and on the 4th attempt it succeeded, in history you will just see a single ActivityTaskStarted event with attempt property set to 4.
This event also has a lastFailure property which will give you the failure of the last performed activity exec.
An activity task can be lost before starting execution. For example, if an activity worker or Temporal frontend crashes while it is being delivered. In this case, a task is retried and an attempt can be more than one on the first actual execution.