Do not record a turn the caller already recorded - #70
Merged
Conversation
invocation.message marks where a turn begins, and whoever handed the message over is the one that knows. Under the platform that is agynd: it opens the trace and records the span before the message reaches this process. Recording a second one puts two on a single turn, and a reader counting turns sees two -- which is what the platform's own trace assertion caught, once agn started writing into the trace agynd opened rather than one of its own. Standalone there is no such caller, and the span is this turn's root. So it is opened only when nothing else has: an inherited span context means somebody already did.
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.
invocation.messagemarks where a turn begins, and whoever handed the message over is the one that knows.Under the platform that is
agynd: it opens the trace and records the span before the message reaches this process. Recording a second one puts two on a single turn, and a reader counting turns sees two:That surfaced the moment agn started writing into the trace agynd opened (#69) rather than one of its own — before that the duplicate was invisible because the two spans were in different traces.
Standalone there is no such caller and the span is this turn's root, so it is opened only when nothing else has: an inherited span context means somebody already did.