SIGN IN SIGN UP

fix(cloudflare): Skip binding instrumentation work when spans are not sent (#24655)

The Durable Object SQL instrumentation sanitized and summarized each
query, also when the span could not be sent: tracing not configured, or
an unsampled parent. On SQL-heavy Durable Objects, this was a large CPU
cost with `tracesSampleRate: 0`.

In these cases, the query is not sanitized now. `startSpan` still runs
with the name `exec` and the static attributes, so an unsampled span
still records its `sample_rate` outcome. A query that can target a `cf_`
table takes the full path, because an internal query must not start a
span.

Under span streaming with an unsampled parent, an `ignoreSpans` rule
that matches the span name or `db.query.text` does not match now. Thus
the dropped span is reported as `sample_rate`, not `ignored`. The number
of dropped spans does not change. Rules that match `op: 'db.query'` are
not affected.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: isaacs <i@izs.me>
J
Jan Peer Stöcklmair committed
fe68d49ad89b79714421835a4313ff0d88c74f74
Parent: e4d6f64
Committed by GitHub <noreply@github.com> on 10/1/2026, 2:17:50 PM