-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: tracers provided by the API become useable when provider registered #1448
feat: tracers provided by the API become useable when provider registered #1448
Conversation
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.
Looks great!
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'm missing the whole picture, how the new proxy classes should be used outside of api. I checked the draft for new base plugin and they are not used there, is this still in progress ? If exporting them is intentional where are they going to be used yet and how? thx
The basic idea is that if a library has built-in instrumentation, we will not have as much control over load order. We might have the case where a library is required and it calls
The API is used the exact same way by users and plugins with no change. The only difference is that if you call |
@dyladan it could be merged once you resolve the conflicts |
Build still needs to be fixed |
Codecov Report
@@ Coverage Diff @@
## master #1448 +/- ##
==========================================
- Coverage 93.91% 93.85% -0.06%
==========================================
Files 151 153 +2
Lines 4615 4656 +41
Branches 953 960 +7
==========================================
+ Hits 4334 4370 +36
- Misses 281 286 +5
|
This is important to fix the load order issue as it relates to plugin setup. Currently, plugins can't be set up until after the tracer provider is created, and creating the tracer provider starts the resource detectors. If a resource detector like GCP uses a module that needs to be instrumented, the plugin may not be able to instrument it if it is loaded after the resource detectors run.
After this PR, plugins can be set up before the tracer provider. When they are constructed, they will acquire Proxy Tracers from the API. Then, when the tracer provider is registered, those proxy tracers become fully useable without the plugin having to acquire a new tracer.