-
Notifications
You must be signed in to change notification settings - Fork 835
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
chore: requires user to pass context to propagation APIs #1734
chore: requires user to pass context to propagation APIs #1734
Conversation
At least for extract() using the current active context is often a bad choice because usually a plugin wants to use an extracted span instead the current active. Change propagation APIs to require context as first argument instead of using active context on default. This ensures that plugin developers have to be explicit instead of relying on a potential wrong default.
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.
lgtm
Codecov Report
@@ Coverage Diff @@
## master #1734 +/- ##
==========================================
+ Coverage 91.96% 92.17% +0.20%
==========================================
Files 167 167
Lines 5599 5594 -5
Branches 1193 1191 -2
==========================================
+ Hits 5149 5156 +7
+ Misses 450 438 -12
|
2928a1c
to
c2ef934
Compare
@Flarna pls allow edits or update the branch |
@obecny I enabled it on my PR but as far as I know github doesn't support/allow edits for org repos like that one I have to use because of company rules. |
Failed test seems to be unrelated.
|
It is failing in few other places. It is http plugin test, @vmarchaud you are the most familiar with this plugin, do you have maybe idea what can be the issue ? for example here too |
I didn't wrote that part but from the comment its seems that |
Yea it makes sense, now I see this external domain, thx @vmarchaud for explanation |
…try#1734) * chore: requires user to pass context to propagation APIs At least for extract() using the current active context is often a bad choice because usually a plugin wants to use an extracted span instead the current active. Change propagation APIs to require context as first argument instead of using active context on default. This ensures that plugin developers have to be explicit instead of relying on a potential wrong default. * (chore) fix lint * add test * Adapt http instrumentation * fix: update integration testserver
…try#1734) * chore: requires user to pass context to propagation APIs At least for extract() using the current active context is often a bad choice because usually a plugin wants to use an extracted span instead the current active. Change propagation APIs to require context as first argument instead of using active context on default. This ensures that plugin developers have to be explicit instead of relying on a potential wrong default. * (chore) fix lint * add test * Adapt http instrumentation * fix: update integration testserver
Which problem is this PR solving?
At least for
extract()
using the current active context is often a bad choice because usually a plugin wants to use an extracted span instead the current active.Short description of the changes
Change propagation APIs to require context as first argument instead of using active context on default. This ensures that plugin developers have to be explicit instead of relying on a potential wrong default.
This PR is an enhanced but API breaking variant of #1714.