-
Notifications
You must be signed in to change notification settings - Fork 312
Support adding W3C baggage as span tags #9169
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d06652d
WIP: baggage span tags
rachelyangdog bb005f5
simple test
rachelyangdog 2f2b83c
Merge branch 'master' into rachel.yang/baggage-span-tags
rachelyangdog 22631c5
fix build errors
rachelyangdog 87e2aaa
adding more tests
rachelyangdog 20885c9
Merge branch 'master' into rachel.yang/baggage-span-tags
rachelyangdog 2ca1604
Add baggage span tags functionality and tests
rachelyangdog de8a55a
Move baggage tags feature to HttpServerDecorator.getExtractedSpanCont…
mcculls 5b52ea4
Fix potential corner-case where TagContext.getTags() may return an im…
mcculls af0a640
Move baggage tags unit test to HttpServerDecoratorTest
mcculls eca080e
Baggage tags unit tests have been moved to HttpServerDecoratorTest
mcculls 2d45a1f
Merge remote-tracking branch 'origin/master' into rachel.yang/baggage…
mcculls 85d573f
Move W3C baggage tag injection to just before the span is serialized
mcculls 33fe83e
Update test trace writer so injected baggage metadata can be asserted…
mcculls 3a8d4a8
spotless format
mcculls a4fb5a6
Remove unused method
mcculls 988bed8
Fix test code
mcculls dd9bbdd
Merge remote-tracking branch 'origin/master' into rachel.yang/baggage…
mcculls a22edab
Support recording of baggage, that would be sent to agent as trace me…
mcculls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
This will only work if the baggage propagator is run after the tracing one, hence its new priority (propagator ordering is part of context API contract so it should be stable).
Another option is to do it on the
HttpServerDecorator.extract()
method. But that will be limited to HTTP instrumentation (which you might want?). WDYT?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.
Yes, I was a bit torn about where to put this part - I went with the propagator (with priority to help the ordering) because it's then at least consistent with
DataStreamsPropagator
.That way it's a bit more obvious which places to go back and fix when we move
CoreTracer
over toContext
:)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.
If you're referring to this comments:
dd-trace-java/dd-trace-core/src/main/java/datadog/trace/core/datastreams/DataStreamsPropagator.java
Line 44 in 3a5c47b
and
dd-trace-java/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/api/AgentPropagation.java
Lines 20 to 21 in 3a5c47b
I reached out to @kr-igor and we will address it by the second end of the quarter.
So if the HttpServerDecorator is a valid candidate (according the web server only limitation), we can add it as comment to move it there when we will do the clean up, and merge it as is. WDYT?
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.
I was meaning more that once
CoreTracer
works off aContext
this code could be removed from the propagator and the priority removed, since we'd no longer need to connect the two pieces. (The changes would be to theCoreTracer
code that currently works off the extracted/tag context types)If there's an intermediate refactoring, then I have no objection to moving this to
HttpServerDecorator
but I'd prefer to leave that decision open for now (since the final goal of removing this code would be the same - TBH we're just moving chairs around atm.)In other words, I don't believe we need to make further changes in this PR - those can be left to future refactoring(s)
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.
I don't either and already stamp the PR 😅