Skip to content

Add dispatch_namespace label to worker invocation metrics#18

Merged
jairo-bc merged 1 commit into
masterfrom
TRAC-174-dispatch-namespace
Jun 25, 2026
Merged

Add dispatch_namespace label to worker invocation metrics#18
jairo-bc merged 1 commit into
masterfrom
TRAC-174-dispatch-namespace

Conversation

@jairo-bc

@jairo-bc jairo-bc commented Jun 25, 2026

Copy link
Copy Markdown

What/Why?

Adds dispatchNamespaceName as a dimension in the workersInvocationsAdaptive GraphQL query and exposes it as a dispatch_namespace label on all cloudflare_worker_* metrics.

For Workers for Platforms deployments, user workers run under a dispatch namespace with UUID-based script names. Without this label, there's no way to group or filter metrics by namespace — only by individual script_name, which is too granular. The dispatch_namespace label enables aggregating all user workers within a namespace (e.g. sum by (dispatch_namespace)).

Non-WfP workers have an empty dispatch_namespace="" label, which is consistent with how other optional dimensions behave.

Rollout/Rollback

Revert PR

Testing

Tested locally on http://localhost:8080/metrics

Adds dispatchNamespaceName as a dimension in the workersInvocationsAdaptive
GraphQL query and exposes it as a dispatch_namespace label on all cloudflare_worker_*
metrics. This allows grouping worker metrics by dispatch namespace, which is useful
for Workers for Platforms deployments where multiple user workers share a namespace.
@jairo-bc
jairo-bc marked this pull request as ready for review June 25, 2026 16:23
@jairo-bc
jairo-bc merged commit 7666c47 into master Jun 25, 2026
10 checks passed
@jairo-bc
jairo-bc deleted the TRAC-174-dispatch-namespace branch June 25, 2026 16:27
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