Skip to content

fix(metrics): always set update_name tag on client request metrics - #3231

Merged
Sushisource merged 1 commit into
temporalio:mainfrom
pcbeingused333:fix/update-name-default-metric-tag
Nov 24, 2026
Merged

Sushisource merged 1 commit into
temporalio:mainfrom
pcbeingused333:fix/update-name-default-metric-tag

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #3210

What changed?
MetricsTag.defaultTags() now includes update_name (default none), like the other per-operation tags (signal_name, query_type, ...).

Why?
GenericWorkflowClientImpl tags UpdateWorkflowExecution requests with update_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.testLongRequestMetricsHaveConsistentTagKeysForUpdates runs a workflow with an update and asserts that all temporal_long_request_latency series share the same tag keys and that the update series carries update_name. It fails before the change (2 distinct key sets) and passes after. MetricsTest passes 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.

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.
@pcbeingused333
pcbeingused333 requested a review from a team as a code owner November 21, 2026 22:01
@Sushisource
Sushisource merged commit e7a0e2a into temporalio:main Nov 24, 2026
23 checks passed
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.

Inconsistent metric tag keys when using Workflow Updates (update_name missing from default tags)

2 participants