Skip to content

feat: add WAE stencil metrics via GraphQL Analytics Engine API#14

Closed
chanceaclark wants to merge 2 commits into
masterfrom
feat/wae-stencil-metrics
Closed

feat: add WAE stencil metrics via GraphQL Analytics Engine API#14
chanceaclark wants to merge 2 commits into
masterfrom
feat/wae-stencil-metrics

Conversation

@chanceaclark

Copy link
Copy Markdown

Summary

  • Query makeswift_stencil_metrics Workers Analytics Engine dataset via the existing Cloudflare GraphQL API client
  • Expose two new Prometheus metrics: cloudflare_wae_stencil_request_count and cloudflare_wae_stencil_avg_duration_ms
  • Dimensions: endpoint (blob1), environment (blob4), cache_hit (blob5), grouped with AVG(double1) for duration and COUNT() for requests

Test plan

  • Deploy to staging and verify metrics appear on /metrics endpoint
  • Confirm labels (endpoint, environment, cache_hit, account) are populated correctly
  • Verify metrics can be denied via METRICS_DENYLIST

🤖 Generated with Claude Code

chanceaclark and others added 2 commits April 8, 2026 14:51
Query makeswift_stencil_metrics dataset from Cloudflare Workers Analytics
Engine and expose as Prometheus metrics (request count and avg duration
by endpoint, environment, and cache hit).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Cloudflare GraphQL API does not support custom WAE datasets.
Switch to the Analytics Engine SQL API endpoint which supports
querying custom datasets directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chanceaclark

Copy link
Copy Markdown
Author

I'll leave the branch up, but closing this PR.

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.

1 participant