Repository navigation
feat(cloudflare): propagate tracing context through Queue messages - #25306
Open
arthurfiorette wants to merge 7 commits into
Open
arthurfiorette wants to merge 7 commits into
arthurfiorette wants to merge 7 commits into
Conversation
- Replace `enableQueueTracePropagation` with `queueTracePropagationBindings`, matching `rpcTracePropagationBindings`: producers opt in per binding, consumers always strip and link. - Drop the `previous_trace` link type, a batch fans in producers rather than chaining traces. - Strip the carrier with `Reflect.deleteProperty` on the shared key so frozen bodies cannot throw. - Compute the publish body size once when propagation is enabled. - Move the queue integration assertions to span streaming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arthurfiorette
marked this pull request as ready for review
October 13, 2026 03:47
arthurfiorette
requested review from
JPeer264 and
mydea
and removed request for
a team
October 13, 2026 03:47
Member
|
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 |
…ueue-links # Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends #22303, which was auto-closed for inactivity after its review comments slipped through my GitHub inbox. It is now synced with
developand addresses that review.Adds opt-in trace propagation from Cloudflare Queue producers to consumers.
queueTracePropagationBindings, plain-object message bodies carry the producer'ssentry-traceunder__sentry_queue_trace__.queue.processremains a root span and links to every distinct producer in the batch.Span links are used instead of continuing a producer trace because a Queue batch can contain messages from unrelated traces. Picking one producer as the parent would create false causal relationships for the other messages.
Propagation is opt-in per binding because Cloudflare Queues has no message-header API. The SDK has to modify the message body, so consumers without Sentry would see the extra field.
Changes since #22303:
enableQueueTracePropagation: booleanbecamequeueTracePropagationBindings, mirroringrpcTracePropagationBindings(feat(cloudflare)!: Replace enableRpcTracePropagation with rpcTracePropagationBindings #23486). Only the producer opts in, since it is the side that changes the payload. Consumers always strip and link, the same way RPC receivers handle__sentry_rpc_meta__.sentry.link.type: previous_trace. A batch fans in producers rather than forming a previous/next chain.Fixes #22309