GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(cloudflare): propagate tracing context through Queue messages by arthurfiorette · Pull Request #25306 · getsentry/sentry-javascript Conversation
| ||||||||||||||||||||||||||
|
HI @arthurfiorette thanks for opening another PR for this! I'll leave the review up to @JPeer264 who has more context on the cloudflare specific details. Good idea to use span links. I think we should still set the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ueue-links # Conflicts: # CHANGELOG.md
|
I'll wait on reviewing that PR until #21777 is finished. In that PR is an open point on how we deal with span links for queues. This might be then also relevant for this PR. I think by mid next week I can start reviewing this. Hope the timeline is ok for you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Adding a comment here, so the bot isn't creating a false positive.
I'm still working on #21777 to finalize (it is soon ready, just need to polish some things) - then I can review this PR properly
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry that it took a while, but I was finally able to finish of the remaining work of the other PR, that blocked this PR.
It is good that we add a new queueTracePropagationBindings option, since the current one is only focusing on rpc (I originally thought of having a one size fits all option, but I don't think that would have been a good idea).
I added some comments, so please take a look at them. The rest of the code looks good, great work - thank you.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| * ); | ||
| * ``` | ||
| */ | ||
| queueTracePropagationBindings?: TracePropagationTargets; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
note to myself. We might need to extend this in our Vite plugin to automatically add these in case they're in the same deployment
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -1,18 +1,14 @@ | |||
| import { matchesTracePropagationTargets } from '@sentry/core'; | |||
| import { matchesTracePropagationTargets, type TracePropagationTargets } from '@sentry/core'; | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Super low priority. Technically this file is doing more now than just rpcPropagation , so we could rename it to something more generic, but not a must. You can decide as you see fit.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ueue-links # Conflicts: # CHANGELOG.md # packages/cloudflare/src/instrumentations/worker/instrumentEnv.ts # packages/cloudflare/test/instrumentations/instrumentEnv.test.ts
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 27dd16c. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Review comments fixed @JPeer264! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Amazing. Thanks a lot for your work |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution. See #25306 Co-authored-by: JPeer264 <[email protected]>
## DESCRIBE YOUR PR This PR documents the new `queueTracePropagationBindings` option in `@sentry/cloudflare` 11.12.0 ([getsentry/sentry-javascript#25306](getsentry/sentry-javascript#25306), closes [getsentry/sentry-javascript#22309](getsentry/sentry-javascript#22309)). The option connects Cloudflare Queue consumers to the producers that sent their messages. - **Distributed tracing (Cloudflare):** Adds a new "Queue Trace Propagation" section. It covers how to opt in per producer binding, that only plain-object bodies carry the `__sentry_queue_trace__` field, that consumers remove the field automatically, and why `queue.process` links to each producer instead of continuing one producer's trace. It also includes a warning about consumers that don't run Sentry and about the roughly 80 extra bytes per message against the 128 KB limit. - **Options:** Adds a `queueTracePropagationBindings` `SdkOption` next to `rpcTracePropagationBindings`, available since 11.12.0. - **Bindings:** Adds a pointer from the Queues binding to the new section. All wording is based on the option's JSDoc and the implementation in that PR. It does not say the Vite plugin derives queue bindings, because the PR doesn't add that. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) <!-- junior-request-attribution:start --> via **Jan Peer Stöcklmair**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0CA6TD3QRK%3A1794327747.615899 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CA6TD3QRK%3A1794327747.615899) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CA6TD3QRK%3A1794327747.615899/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Jan Peer Stöcklmair <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Cloudflare Queue context propagation and trace links
There was an error while loading. Please reload this page.