Skip to content

Add failure_reason label to activity task failure metrics #865

Description

@jmaeagle99

Is your feature request related to a problem? Please describe.

The temporal_activity_execution_failed and temporal_local_activity_execution_failed worker metrics lack a failure_reason label, making it difficult to categorize activity failure condition from a metrics standpoint. This label exists for Workflow task and Nexus task failures, but not for Activity task failures.

Describe the solution you'd like

The failure_reason label should be applied to the activity task failure metrics when a known failure type causes an activity to fail. Possible examples of the failure conditions:

  • PayloadsTooLarge: The activity result is over the payload size error threshold and the task is proactivity failed by the worker.
  • GrpcMessageTooLarge: The activity result is over the gRPC size threshold and the task is proactively failed by the worker.
  • ExternalStorageError: An external storage operation fails, causing the task to be failed by the worker.
  • ActivityError: Fallback for any other error condition.

Per-SDK Tickets

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions