temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Dynamically generate task type tag value in timer/transfer queue processing

Open yycptt opened this issue 3 years ago • 0 comments

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.

yycptt avatar Jun 14 '22 00:06 yycptt