Repository navigation
fix(metrics): always set update_name tag on client request metrics - #3231
Merged
Sushisource merged 1 commit intoNov 24, 2026
Merged
Sushisource merged 1 commit into
Sushisource merged 1 commit into
Conversation
GenericWorkflowClientImpl tags UpdateWorkflowExecution requests with update_name, but MetricsTag.defaultTags() did not include it. Series of temporal_long_request_latency therefore had a different tag-key set for updates than for every other operation, which strict backends such as Prometheus reject. Register update_name with the default value so all series share the same keys.
Sushisource
approved these changes
Nov 24, 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.
Fixes #3210
What changed?
MetricsTag.defaultTags()now includesupdate_name(defaultnone), like the other per-operation tags (signal_name,query_type, ...).Why?
GenericWorkflowClientImpltagsUpdateWorkflowExecutionrequests withupdate_name, but the default tag set did not contain it. As a result,temporal_long_request_latency(and the other request metrics) had one set of tag keys for updates and a different one for every other operation. Backends that require a consistent label set per metric name (Prometheus, for example) reject or drop the series. Registering the tag with a default value makes every series share the same keys.Test
MetricsTest.testLongRequestMetricsHaveConsistentTagKeysForUpdatesruns a workflow with an update and asserts that alltemporal_long_request_latencyseries share the same tag keys and that the update series carriesupdate_name. It fails before the change (2 distinct key sets) and passes after.MetricsTestpasses in full (8 passed, 1 pre-existing skip).Breaking changes?
None. Metrics for non-update operations gain an
update_name="none"tag.Server PR
N/A
Disclosure: this change was prepared with the assistance of an AI coding tool (Claude Code) and submitted by a human contributor.