Skip to content

Emit payload size for UpdateWorkflowExecution requests#10223

Merged
spkane31 merged 3 commits into
mainfrom
worktree-update-payload-size-metric
May 12, 2026
Merged

Emit payload size for UpdateWorkflowExecution requests#10223
spkane31 merged 3 commits into
mainfrom
worktree-update-payload-size-metric

Conversation

@spkane31
Copy link
Copy Markdown
Contributor

@spkane31 spkane31 commented May 11, 2026

Summary

  • Emit the EventBlobSize for UpdateWorkflowExecution requess, tagged with namespace.

Mirrors activity_payload_size and schedule_payload_size, tagged with
namespace and operation via the standard TelemetryInterceptor handler.
Enables per-namespace querying of Workflow Update args byte volume,
which header_size and per-feature payload metrics did not cover.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread common/metrics/metric_defs.go Outdated
@spkane31 spkane31 marked this pull request as ready for review May 11, 2026 22:08
@spkane31 spkane31 requested review from a team as code owners May 11, 2026 22:08
@spkane31 spkane31 changed the title Add update_payload_size metric for Workflow Update args Emit payload size for UpdateWorkflowExecution requests May 12, 2026
@spkane31 spkane31 merged commit a05038c into main May 12, 2026
49 checks passed
@spkane31 spkane31 deleted the worktree-update-payload-size-metric branch May 12, 2026 22:43
spkane31 added a commit that referenced this pull request May 13, 2026
## What changed?
Use a metrics handler without `header_callsite` tag because Prometheus
rejects re-registering the same metric with a different label set and
logs `error in prometheus reporter ... event_blob_size ... has different
label names`.

## Why?
Fix found from regression

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
Fixes a regression introduced in #10223
spkane31 added a commit that referenced this pull request May 14, 2026
## What changed?
Add `WithTags(metrics.CommandType(Unspecified))` to the call sites for
Workflow Update event_blob_size metric emission, which was missing in
the pathch #10253 to the problem introduced in #10223

## Why?
Fixes a warning and dropped metric when the metrics handler has
different shapes

## How did you test it?
- [ ] built
- [X] run locally and tested manually: Ran server with `make start`,
created a simple workflow with an update handler, start the worker,
start a workflow, and send the update. Grepped server logs for `error in
prometheus reporter` and `event_blob_size` and curled the metrics
endpoint `curl -s http://127.0.0.1:8000/metrics > /tmp/snapshot.txt`
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
Minimal, fixing bug
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.

3 participants