Use task queue kind instead of name prefix for nexus metrics#10141
Merged
Use task queue kind instead of name prefix for nexus metrics#10141
Conversation
…nal tag Replace string prefix check on task queue name with TASK_QUEUE_KIND_WORKER_COMMANDS enum check, now that the kind exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Centralize the internal task queue kind check in common/primitives alongside the existing internal task queue helpers. Update the handler test to use TASK_QUEUE_KIND_WORKER_COMMANDS instead of relying on the name prefix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ncy in test Enumerate all TaskQueueKind values explicitly so adding a new kind forces a decision about whether it's internal. Use a plain task queue name in the test to prove is_internal depends only on the kind. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without the default case, the exhaustive linter will flag this switch when a new TaskQueueKind is added, forcing the developer to decide whether the new kind is internal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ShahabT
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Use
TASK_QUEUE_KIND_WORKER_COMMANDSenum check instead of string prefix matching on the task queue to determine if its internal queue.Why
PR #9899 introduced
TASK_QUEUE_KIND_WORKER_COMMANDS. The original code (PR #9760) predated this and relied on the/temporal-sys/name prefix as a workaround.How did you test it?
Existing tests
🤖 Generated with Claude Code