@@ -5232,9 +5232,8 @@ func (*testTaskManager) CountTaskQueuesByBuildId(context.Context, *persistence.C
52325232 return 0 , nil
52335233}
52345234
5235- // TestLoggerAndMetricsForPartition_BreakdownEnabled verifies partition and taskqueue tag values
5236- // with the default BreakdownMetricsByTaskQueue=true: normal and worker-commands queues show their
5237- // name, sticky queues show the base name, and each partition type gets its own partition tag.
5235+ // TestLoggerAndMetricsForPartition_BreakdownEnabled verifies the taskqueue and partition metric
5236+ // tags for each task queue kind with the default BreakdownMetricsByTaskQueue=true.
52385237func TestLoggerAndMetricsForPartition_BreakdownEnabled (t * testing.T ) {
52395238 t .Parallel ()
52405239
@@ -5252,22 +5251,22 @@ func TestLoggerAndMetricsForPartition_BreakdownEnabled(t *testing.T) {
52525251 expectPartitionTag string
52535252 }{
52545253 {
5255- name : "normal task queue uses actual queue name " ,
5254+ name : "normal" ,
52565255 partition : newRootPartition (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ),
52575256 expectTQValue : "my-task-queue" ,
52585257 expectPartitionTag : "0" ,
52595258 },
52605259 {
5261- name : "worker-commands queue gets __worker_commands__ partition tag " ,
5262- partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ). WorkerCommandsPartition ( "/temporal-sys/worker-commands/ns/key" ),
5260+ name : "sticky " ,
5261+ partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_WORKFLOW ). StickyPartition ( uuid . NewString () ),
52635262 expectTQValue : "my-task-queue" ,
5264- expectPartitionTag : "__worker_commands__ " ,
5263+ expectPartitionTag : "__sticky__ " ,
52655264 },
52665265 {
5267- name : "sticky task queue uses base queue name " ,
5268- partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_WORKFLOW ). StickyPartition ( uuid . NewString () ),
5266+ name : "worker-commands " ,
5267+ partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ). WorkerCommandsPartition ( "/temporal-sys/worker-commands/ns/key" ),
52695268 expectTQValue : "my-task-queue" ,
5270- expectPartitionTag : "__sticky__ " ,
5269+ expectPartitionTag : "__worker_commands__ " ,
52715270 },
52725271 }
52735272
@@ -5292,8 +5291,8 @@ func TestLoggerAndMetricsForPartition_BreakdownEnabled(t *testing.T) {
52925291 }
52935292}
52945293
5295- // TestLoggerAndMetricsForPartition_BreakdownDisabled verifies behavior with BreakdownMetricsByTaskQueue=false:
5296- // all partition types get taskqueue=__omitted__, but each still gets its own partition tag .
5294+ // TestLoggerAndMetricsForPartition_BreakdownDisabled verifies the taskqueue and partition metric
5295+ // tags for each task queue kind with BreakdownMetricsByTaskQueue=false .
52975296func TestLoggerAndMetricsForPartition_BreakdownDisabled (t * testing.T ) {
52985297 t .Parallel ()
52995298
@@ -5315,22 +5314,22 @@ func TestLoggerAndMetricsForPartition_BreakdownDisabled(t *testing.T) {
53155314 expectPartitionTag string
53165315 }{
53175316 {
5318- name : "normal task queue is omitted when breakdown disabled " ,
5317+ name : "normal" ,
53195318 partition : newRootPartition (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ),
53205319 expectTQValue : "__omitted__" ,
53215320 expectPartitionTag : "0" ,
53225321 },
53235322 {
5324- name : "worker-commands queue gets __worker_commands__ partition when breakdown disabled " ,
5325- partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ). WorkerCommandsPartition ( "/temporal-sys/worker-commands/ns/key" ),
5323+ name : "sticky " ,
5324+ partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_WORKFLOW ). StickyPartition ( uuid . NewString () ),
53265325 expectTQValue : "__omitted__" ,
5327- expectPartitionTag : "__worker_commands__ " ,
5326+ expectPartitionTag : "__sticky__ " ,
53285327 },
53295328 {
5330- name : "sticky task queue is omitted when breakdown disabled " ,
5331- partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_WORKFLOW ). StickyPartition ( uuid . NewString () ),
5329+ name : "worker-commands " ,
5330+ partition : newTestTaskQueue (ns .ID ().String (), "my-task-queue" , enumspb .TASK_QUEUE_TYPE_NEXUS ). WorkerCommandsPartition ( "/temporal-sys/worker-commands/ns/key" ),
53325331 expectTQValue : "__omitted__" ,
5333- expectPartitionTag : "__sticky__ " ,
5332+ expectPartitionTag : "__worker_commands__ " ,
53345333 },
53355334 }
53365335
0 commit comments