Skip to content

fix(messagequeue): drop the partition key from queue metric tags - #593

Merged
mnoah1 merged 2 commits into
mainfrom
mnoah1/queue-metric-partition-key
Aug 14, 2026
Merged

fix(messagequeue): drop the partition key from queue metric tags#593
mnoah1 merged 2 commits into
mainfrom
mnoah1/queue-metric-partition-key

Conversation

@mnoah1

@mnoah1 mnoah1 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Why?

Remove partition as a metric tag on the queue metrics.

What?

In the messaging queue, the controllers can set any partition value. We have several controllers throughout the services that have an effectively unbounded number of partitions being set (e.g. some use request ID or build ID to partition).

This results in dangerous metric cardinality when the partition gets used as a tag.

Four topics derive partition keys from per-entity IDs — log and cancel from
the request ID, build from the batch ID, buildsignal from the build ID — so
tagging metrics with the key minted a permanent series family per request,
batch, and build. Tally only reclaims a subscope when it is explicitly
closed, and nothing closes per-partition scopes.

Topic and consumer group stay, keeping per-stage latency and error rates
intact, and partition identity is already in the structured logs. The
per-queue breakdown on queue-partitioned topics goes with it; restoring it
needs a bounded opt-in rather than tagging every topic.
@mnoah1
mnoah1 marked this pull request as ready for review August 14, 2026 20:28
@mnoah1
mnoah1 requested review from a team, behinddwalls and sbalabanov as code owners August 14, 2026 20:28
@mnoah1
mnoah1 added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit e7d81af Aug 14, 2026
15 checks passed
@mnoah1
mnoah1 deployed to stack-rebase August 14, 2026 20:45 — with GitHub Actions Active
@behinddwalls
behinddwalls deleted the mnoah1/queue-metric-partition-key branch August 14, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants