Skip to content

Remove experimental gate from Queues metrics APIs#6557

Merged
npaun merged 1 commit intocloudflare:mainfrom
KennethRuan:graduate-queues-metrics-from-experimental
Apr 15, 2026
Merged

Remove experimental gate from Queues metrics APIs#6557
npaun merged 1 commit intocloudflare:mainfrom
KennethRuan:graduate-queues-metrics-from-experimental

Conversation

@KennethRuan
Copy link
Copy Markdown
Member

@KennethRuan KennethRuan commented Apr 10, 2026

Summary

This PR removes the experimental gate from the Queue metrics APIs.

It ungates the three features:

  • Add env.QUEUE.metrics() method MQ-1154
  • Add response body with metrics to env.QUEUE.send() and env.QUEUE.sendBody() MQ-1200
  • Add metrics to queue() handler MQ-1202

The upstream services that call workerd have been updated:

Changes

  1. The Javascript API for send() and sendBatch() now call WorkerQueue::sendWithResponse and WorkerQueue::sendBatchWithResponse respectively.

  2. metrics(): Promise<QueueMetrics> definition on queue binding is no longer gated behind experimental flag

  3. readonly metadata: MessageBatchMetadata definition on queue() handler is no longer gated behind experimental flag

  4. Removed reference to METADATA_FLAG and the flag disabled cases in tests.

  5. Types regenerated using just generate-types

Testing

  • bazel test //src/workerd/api/tests:queue-test@ //src/workerd/api/tests:queue-metrics-test@ //src/workerd/api/tests:queue-metadata-test@ //src/workerd/api/tests:queue-metrics-sentinel-test@ //src/workerd/api/tests:queue-producer-metadata-test@
  • bazel test //src/workerd/api/tests:queue-test@all-compat-flags //src/workerd/api/tests:queue-metrics-test@all-compat-flags //src/workerd/api/tests:queue-metadata-test@all-compat-flags //src/workerd/api/tests:queue-metrics-sentinel-test@all-compat-flags //src/workerd/api/tests:queue-producer-metadata-test@all-compat-flags
  • Tested experimental workers locally with Miniflare and in production queues

@KennethRuan KennethRuan force-pushed the graduate-queues-metrics-from-experimental branch from 9ed65b6 to c01b67b Compare April 13, 2026 17:09
@KennethRuan KennethRuan marked this pull request as ready for review April 13, 2026 17:13
@KennethRuan KennethRuan requested review from a team as code owners April 13, 2026 17:13
@KennethRuan KennethRuan requested a review from emily-shen April 13, 2026 17:13
@KennethRuan KennethRuan force-pushed the graduate-queues-metrics-from-experimental branch from c01b67b to e396a43 Compare April 13, 2026 20:26
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 13, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing KennethRuan:graduate-queues-metrics-from-experimental (a94fc17) with main (80a327c)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@KennethRuan KennethRuan force-pushed the graduate-queues-metrics-from-experimental branch 2 times, most recently from 119aeaa to f59a4d3 Compare April 14, 2026 16:27
@KennethRuan KennethRuan force-pushed the graduate-queues-metrics-from-experimental branch from f59a4d3 to a94fc17 Compare April 14, 2026 16:35
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.85%. Comparing base (e6407c3) to head (a94fc17).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6557      +/-   ##
==========================================
- Coverage   70.88%   70.85%   -0.04%     
==========================================
  Files         438      438              
  Lines      123484   123642     +158     
  Branches    19426    19455      +29     
==========================================
+ Hits        87534    87606      +72     
- Misses      24442    24513      +71     
- Partials    11508    11523      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@npaun npaun merged commit c39c491 into cloudflare:main Apr 15, 2026
22 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.

5 participants