Add nexus_task_requests metric with client_name tag#9760
Merged
Conversation
Emit a new nexus_task_requests counter in the matching service handler for PollNexusTaskQueue, RespondNexusTaskCompleted, and RespondNexusTaskFailed. The metric carries both task_queue (from the request) and client_name (from the propagated gRPC client-name header), enabling per-SDK filtering of internal (temporal-sys/*) Nexus traffic from real customer usage. This is a server-side replacement for the Envoy-based daily_sdk_usage metric for Nexus adoption tracking. The metric is only recorded for direct SDK requests, not forwarded partition-internal requests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dd44dc9 to
480d026
Compare
Match the Envoy-based adoption metric dimensions: namespace, operation (PollNexusTaskQueue, RespondNexusTaskCompleted, RespondNexusTaskFailed), and client_name. Removed task_queue breakdown since it's not needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip emitting the metric for task queues prefixed with /temporal-sys/ (server-internal Nexus services like worker-commands) to avoid polluting adoption metrics with internal traffic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace skip-on-internal with an is_internal bool tag so consumers can filter or group by internal vs external Nexus traffic. Internal queues are identified by the /temporal-sys/ task queue prefix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The /temporal-sys/ prefix is not Nexus-specific. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ShahabT
approved these changes
Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
New
nexus_task_requestscounter in the matching service withnamespace,operation,client_name, andis_internaldimensions. Internal requests are identified by the/temporal-sys/task queue prefix.Note:
BreakdownMetricsByTaskQueueshould not be enabled for/temporal-sys/queues as they are per-worker and will cause cardinality explosion.Why
Enables server-side Nexus adoption measurement with SDK breakdown, while allowing consumers to filter out internal Nexus traffic (e.g. worker-commands).
How did you test it?
Unit tests verify correct tag emission for Poll, RespondCompleted, absent-header, and
is_internal=truefor/temporal-sys/queues. Functional test proves end-to-endclient-nameheader propagation from frontend through matching.