Skip to content

Verbose Activity Logging #7583

@natemort

Description

@natemort

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:

  1. 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.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew featuregood first issueUp for grab as first issue to contribute to Cadence projectup-for-grabsIssues that are good entry points for those new to Cadence that want to contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions