temporalio / temporalio/temporal
Dynamically generate task type tag value in timer/transfer queue processing
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.
Right now we have one task type tag value look up table for each queue processor: active/standby transfer/timer and visibility. Is it possible to get rid of the look up table and dynamically generate the value based on task type (there's an existing proto enum definition for task type)?
See discussion here: https://github.com/temporalio/temporal/pull/2930#discussion_r891459319
Describe the solution you'd like
A clear and concise description of what you want to happen.
- If we want the exact same metrics as today, we need to do some string manipulation on the return value of taskType.String(). For example, replace "Transfer" with "TransferActiveTask" or add "TimerActive" to the return value. And there's some special case where taskType.String() does not match the currently emitted task type tag value.
- We can update proto definition for those enums so that there's no special case. But we still need to add "Active" or "Standby" to the return value.
- We make a small "breaking" change and change the task tag value emitted. Since our dashboard queries aggregates on task type, the dashboard will continue to worker. Only when the query is for a specific task type, will it be break. But still, "Active" or "Standby" need to be added to the return value.
- Use a new tag for active & standby. This will break existing dashboard and we need to update all dashboard & alert queries.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
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 locating the active/standby transfer, timer, and visibility queue processors, their task type lookup tables, and the existing proto task type enum. Compare current emitted tag values with dashboard and alert queries, then define the chosen compatibility approach and verify that task type metrics and affected queries use the intended dynamic values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100