Repository navigation
Conversation
…ducer The consumer span carried the inbound envelope trace unchanged, which is the producer span, so both halves of a hop shared one span_id (SPEC 13.1.1). Use childSpan(env.trace) for the consumer span, ctx.traceContext and the ambient trace.
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.
Issue
The receiver closed its consumer span on the inbound
env.traceunchanged. That trace is the sender's producer span, so both halves of a hop shared onespan_idand parent. The consumer ended up as the producer's sibling, not its child (SPEC §13.1.1: "the consumer'sparent_span_idis the producer'sspan_id"). Calls made from inside the handler then hung off the producer span instead of the consumer span (§13.1: "Setparent_span_idto its ownspan_id").Changes
src/mesh.ts: request dispatch now createschildSpan(env.trace)and uses it for the consumer span,ctx.traceContextandrunWithTrace.__tests__/unit/consumer-span.test.ts: new test through the real dispatch path. It checks the consumer's parent andspan_id,ctx.traceContext, and the parent of a delegated call. It fails onmainand passes with this change.CHANGELOG.md: Unreleased entry.npm run lintandnpm testpass.fast-nkeys.test.ts› "throws on the same bad input as before" fails now and then in full runs, onmaintoo. It is unrelated to this change.