Repository navigation
v7: Carry trace context in message headers across processes - #116
Merged
Merged
Conversation
…sses ObvsMessageHeaders.Get/Set attach headers to a message instance without changing its type or any transport interface; they're held in a weak table, so they go when the message does. Sending adds the producer span's W3C trace context (traceparent, tracestate) to the outgoing message's headers, keeping any the app set, or the ambient span's when nobody listens to Obvs's spans. A handler's process span becomes a child of the span in the message's traceparent, so the receiving service continues the sender's trace. RabbitMQ sends a message's headers as AMQP headers and sets them on each message it receives. The in-memory transport passes the sender's object to the receiver, so headers already travel with it. Kafka, NATS, ActiveMQ and NetMQ will get header support with their Use<Transport>() increments. Part of #90. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Microsoft's download origin returns 409 for the new SDK 10.0.403 and runtime 10.0.14, so setup-dotnet fails to install 10.0.x. Go back to 10.0.x once that release downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
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.
Sixth v7 increment, completing the tracing half of #90 (follows #115). Targets
v7.What changes
processspan becomes a child of the sender'ssend,publishorrequestspan, in the same trace. Request → handler → reply stay in one trace too.ObvsMessageHeaders:Get(message)andSet(message, headers)attach headers to a message instance without changing its type or any transport interface. Apps can use them for their own headers, for example a tenant ID; trace context is added alongside and never replaces them. It also defines the W3C header names,ObvsMessageHeaders.TraceParentandTraceState.DistributedContextPropagator. If nobody listens to Obvs's own spans, it propagates the ambient span instead, such as an incoming web request's.Design notes
Use…()increments.Tests (written first)
traceparentof the send span lands in the message's headers;Explicit, real broker), 2 tests: a trace continues across two hosts connected only through RabbitMQ, and an app-set header survives the trip. The receiver works on a freshly deserialized object, so these pass only if the context really crossed the wire.NotImplementedException.🤖 Generated with Claude Code