Add dispatch_namespace label to worker invocation metrics#18
Merged
Conversation
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
marked this pull request as ready for review
June 25, 2026 16:23
chanceaclark
approved these changes
Jun 25, 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.
What/Why?
Adds
dispatchNamespaceNameas a dimension in theworkersInvocationsAdaptiveGraphQL query and exposes it as adispatch_namespacelabel on allcloudflare_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. Thedispatch_namespacelabel 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