temporalio / temporalio/temporal
Adding a custom label to Temporal out-of-the-box metric
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.2k
- Forks
- 1.9k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 228
Description
Is your feature request related to a problem? Please describe.
The default out-of-the-box metrics have been very helpful. Meanwhile, I thought adding custom labels (dimensions) to these metrics would offer more precise insights for troubleshooting.
For example, we are submitting thousands of WorkflowA instances, each with multiple subtype values. While temporal_workflow_failed is a useful metric for tracking failures, we would have better insights if we could add subtype as a custom label in the metric, such as temporal_workflow_failed{..., subtype=...}.
Describe the solution you'd like
When adding a custom Search Attribute, it would be helpful if Temporal provided an option to include these attributes as metric labels. This would make it easier to centralize and use custom Search Attributes directly in metric labels.
Describe alternatives you've considered
If it were possible to reference and copy the default out-of-the-box metrics within workflow or activity code, we could modify these metrics to include additional labels.
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Temporal's out-of-the-box metrics are defined and how custom Search Attributes are registered and exposed. Determine whether Search Attributes can safely become metric labels, and document the supported behavior and limitations. Done means the feature design is agreed and includes coverage for labels such as subtype.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100