Skip to content

feat(cloudflare)!: Match rpcTracePropagationBindings case-insensitively - #23625

Merged
JPeer264 merged 1 commit into
jp/rpc-trace-propagation-targets-vitefrom
jp/rpc-trace-propagation-bindings-case-insensitive
Aug 28, 2026
Merged

feat(cloudflare)!: Match rpcTracePropagationBindings case-insensitively#23625
JPeer264 merged 1 commit into
jp/rpc-trace-propagation-targets-vitefrom
jp/rpc-trace-propagation-bindings-case-insensitive

Conversation

@JPeer264

Copy link
Copy Markdown
Member

rpcTracePropagationBindings matched binding names with stringMatchesSomePattern, which compares strings case-sensitively and calls test() on the regex as given. A target carrying the g or y flag is stateful through lastIndex, so it matched only every other binding lookup.

The bindings now go through matchesTracePropagationTargets, the same matcher tracePropagationTargets uses since #23534. It lower-cases both sides and drops the g/y flags before testing.

matchesTracePropagationTargets gained a requireExactStringMatch parameter for this, named after the same parameter on isMatchingPattern. Binding names need an exact string match, otherwise an entry of DB would also enable propagation for MY_DB.

The new integration suite lists the bindings as 'my_durable_object' and /^svc_/g while they are named MY_DURABLE_OBJECT, SVC_ALPHA and SVC_BETA. SVC_BETA is the binding a stateful g regex drops, because matching SVC_ALPHA already moved its lastIndex past the start of the string.

@github-actions

github-actionsBot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

PathSize% ChangeChange
@sentry/browser28.56 kB--
@sentry/browser - with treeshaking flags26.92 kB--
@sentry/browser - with treeshaking flags tracing without tracing26.82 kB--
@sentry/browser (incl. Tracing)48.64 kB+0.02%+7 B 🔺
@sentry/browser (incl. Tracing + Span Streaming)48.65 kB+0.02%+6 B 🔺
@sentry/browser (incl. Tracing, Profiling)51.56 kB+0.02%+10 B 🔺
@sentry/browser (incl. Tracing, Replay)88.09 kB+0.01%+7 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags77.52 kB+0.01%+5 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas)92.79 kB+0.01%+6 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback)105.74 kB+0.01%+6 B 🔺
@sentry/browser (incl. Feedback)46.05 kB--
@sentry/browser (incl. sendFeedback)33.62 kB--
@sentry/browser (incl. FeedbackAsync)38.73 kB--
@sentry/browser (incl. Metrics)29.51 kB--
@sentry/browser (incl. Logs)29.8 kB--
@sentry/browser (incl. Metrics & Logs)30.43 kB--
@sentry/react30.3 kB--
@sentry/react (incl. Tracing)50.84 kB+0.02%+6 B 🔺
@sentry/vue35.69 kB--
@sentry/vue (incl. Tracing)50.87 kB+0.02%+8 B 🔺
@sentry/svelte28.59 kB--
CDN Bundle30.35 kB--
CDN Bundle (incl. Tracing)49.25 kB+0.04%+15 B 🔺
CDN Bundle (incl. Logs, Metrics)32.58 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)51.15 kB+0.05%+25 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics)73.17 kB--
CDN Bundle (incl. Tracing, Replay)86.74 kB+0.02%+15 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)88.62 kB+0.02%+14 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback)92.63 kB+0.02%+17 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)94.52 kB+0.02%+16 B 🔺
CDN Bundle - uncompressed89.95 kB--
CDN Bundle (incl. Tracing) - uncompressed146.85 kB+0.02%+23 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed96.24 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed152.54 kB+0.02%+23 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed225.41 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed266.34 kB+0.01%+23 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed272.02 kB+0.01%+23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed280.05 kB+0.01%+23 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed285.71 kB+0.01%+23 B 🔺
@sentry/nextjs (client)53.42 kB+0.02%+7 B 🔺
@sentry/sveltekit (client)49.08 kB+0.02%+5 B 🔺
@sentry/core/server65.16 kB+0.01%+3 B 🔺
@sentry/core/browser51.8 kB+0.01%+2 B 🔺
@sentry/node122.75 kB+0.03%+32 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection)85.23 kB--
@sentry/node - without tracing87.75 kB+0.04%+35 B 🔺
@sentry/node - without channel injection102.42 kB+0.04%+32 B 🔺
@sentry/aws-serverless95.91 kB+0.04%+36 B 🔺
@sentry/cloudflare (withSentry) - minified199.73 kB+0.03%+45 B 🔺
@sentry/cloudflare (withSentry)496.72 kB+0.11%+527 B 🔺

View base workflow run

@JPeer264
JPeer264force-pushed the jp/rpc-trace-propagation-bindings-case-insensitive branch from 5194115 to ecf53ccCompareAugust 26, 2026 09:18
@JPeer264
JPeer264force-pushed the jp/rpc-trace-propagation-bindings-case-insensitive branch from ecf53cc to d82956aCompareAugust 26, 2026 10:54
@JPeer264
JPeer264force-pushed the jp/rpc-trace-propagation-bindings-case-insensitive branch from d82956a to 4d6c2e7CompareAugust 26, 2026 11:48
@JPeer264

Copy link
Copy Markdown
MemberAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4d6c2e7. Configure here.

@JPeer264
JPeer264 marked this pull request as ready for review August 26, 2026 14:44
@JPeer264
JPeer264 requested a review from a team as a code ownerAugust 26, 2026 14:44
@JPeer264
JPeer264 requested review from andreiborza, chargome and isaacs and removed request for a teamAugust 26, 2026 14:44
`rpcTracePropagationBindings` matched binding names with `stringMatchesSomePattern`,
which compares strings case-sensitively and calls `test()` on the regex as given. A
target carrying the `g` or `y` flag is stateful through `lastIndex`, so it matched only
every other binding lookup.
The bindings now go through `matchesTracePropagationTargets`, the same matcher
`tracePropagationTargets` uses since #23534. It lower-cases both sides and drops the
`g`/`y` flags before testing.
`matchesTracePropagationTargets` gained a `requireExactStringMatch` parameter for this,
named after the same parameter on `isMatchingPattern`. Binding names need an exact
string match, otherwise an entry of `DB` would also enable propagation for `MY_DB`.
The new integration suite lists the bindings as `'my_durable_object'` and `/^svc_/g`
while they are named `MY_DURABLE_OBJECT`, `SVC_ALPHA` and `SVC_BETA`. `SVC_BETA` is the
binding a stateful `g` regex drops, because matching `SVC_ALPHA` already moved its
`lastIndex` past the start of the string.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JPeer264
JPeer264force-pushed the jp/rpc-trace-propagation-bindings-case-insensitive branch from 4d6c2e7 to dabd3b8CompareAugust 28, 2026 11:59
@JPeer264
JPeer264 merged commit b5b06be into developAug 28, 2026
818 of 822 checks passed
@JPeer264
JPeer264 deleted the jp/rpc-trace-propagation-bindings-case-insensitive branch August 28, 2026 12:44
Sign up for freeto 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

@JPeer264@andreiborza