-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow exit spans to have child spans with the same type and subtype #1320
Conversation
Do not silently drop child spans of exit spans. The spec allows for exit spans to have child spans if they have the same type and subtype. One example of this is http trace requests being child spans of an exit span. Update exit span test to make sure the feature is working as intended.
🌐 Coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be checking the type/subtype in Span.End
, rather than at creation time? Type/Subtype are mutable.
Also, should we check that the child span is not an exit span? The spec says that the child span must not have any destination context. That's to ensure we don't count both the exit span and its children in destination metrics.
What should happen if a child is created for a child of an exit span?
Type/SubType is mutable. Move validation inside span.end and drop span according to the spec.
According to the spec: These spans MUST NOT have any destination context, so that there's no effect on destination metrics. Update the code accordingly to remove destination context from them.
Moving the check to span.end introduced a small change in behaviour: child spans of exit spans are not dropped immediately. Update test case to account for that
Good point! Changed.
Updated the code to remove destination context 👍
The spec does not forbid that. The status of the child span has no effect on the decision of dropping the span. |
Co-authored-by: Andrew Wilkins <axwalk@gmail.com>
Do not null out the tracer, instead call the method and follow the proper flow. The destination context is set to null to prevent the spans from being aggregated in the dropped spans metrics.
Do not silently drop child spans of exit spans. The spec allows for exit spans to have child spans if they have the same type and subtype. One example of this is http trace requests being child spans of an exit span.
Update exit span test to make sure the feature is working as intended.
Closes #1319