-
Notifications
You must be signed in to change notification settings - Fork 881
Description
Is your feature request related to a problem? Please describe.
When debugging issues with Activities it is incredibly helpful to have a concrete record of when a given activity starts and stops. This can differ from the values in the workflow history, especially in two scenarios:
- If the activity has retries (which it should) then it only keeps a record of the last attempt. This makes it very difficult to debug repeated failures.
- If the activity runs longer than its timeout then its actual resource usage and behavior on the client is difficult to track. The workflow history is going to show it failing according to the timeout.
If the activity doesn't emit any logs then there's no record of how long it ran for.
Proposed Solution
Add a boolean option to the WorkerOptions to enable verbose activity logging. It should be disabled by default.
When enabled, it should log a message on the start and end of each activity attempt. It should have all of the relevant tags for the activity so that it's clear exactly which activity. Ideally the logs should be explicit about the outcome of the activity (success/failure and failure to report).
This can be implemented in both the Java and Go clients.
Additional context