-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this upgrades OTel libraries to 1.23.0. Brave works in such a way that its central part is the Span. Span is in thread local. Span has the extra map that contains baggage. Baggage can't work without the span. OTel works in such a way that its central part is Context. Context may contain span and / or baggage or whatever you want. You can't merge contexts without putting one in scope. The problem we're facing is that with our API you can create a baggage object and put some values to it at any point in time. In OTel for that baggage to be present you MUST make the baggage current. However, if you make the baggage current you MUST then close it. In our tests we were doing sth like tracer.createBaggage("foo", "bar") that would create the baggage. Under the hood we would create the OTel Context that would merge the current Span context with Baggage context and MAKE THAT ONE CURRENT. The problem is that we never closed it. So the required change is to always use createBaggage(...) and then call makeCurrent() . If you don't call the latter we were leaking a scope. This fixes the Context leakage. What remains is the problem with the Baggage API - I doubt that there is any possibility to call baggage.get().set(...) . That works for Brave but won't work for OTel. fixes gh-173
- Loading branch information
1 parent
372a7c1
commit 9cd01af
Showing
5 changed files
with
42 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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