-
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/plugin injection #1704
Feat/plugin injection #1704
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1704 +/- ##
==========================================
- Coverage 92.36% 92.26% -0.11%
==========================================
Files 157 159 +2
Lines 5108 5195 +87
Branches 1091 1110 +19
==========================================
+ Hits 4718 4793 +75
- Misses 390 402 +12
|
e11e906
to
18f468a
Compare
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 like this idea, but this should also be fixed when all plugins are moved to the new instrumentation class
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.
It looks fine, although I'm wondering if we really want this now, it all depends how urgent is this ?. We are going to implement soon something like this #1672 and then the PluginLoader is going to be deprecated then.
And if I understand correctly then your case should also be covered by this ?
I'm fine with having this solution for the time being, just want to point this out to avoid confusion later that this is going to be deprecated and will require a bit of refactoring from the user anyway.
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, i agree with others that this is only temporary
Just realised one thing the change is in PluginConfig in API not sdk, after GA it will stay there quite long. Let's discuss it on tomorrow JS SIG |
I think we should consider moving all plugin loading and config out of the API if possible. AFAIK it's just the interface so it shouldn't be a problem. |
Hi all, thanks for your comments and looking into this PR. After some more progress, I would like to add the following points that might help in your discussion:
Hope this also helps with any further discussion on improving the instrumentation. |
The sequence of when and how a plugin is loaded/started will not solve the webpack related problems. The version for modules to instrument is needed as the API and as a result the instrumentation points may change heavily between versions. |
This isn't about changing the sequence. It means the app developer can include the plugins they need as |
We talked about this in the SIG meeting and we would like to move all plugin related interfaces out of the API module and into the |
|
@richardcornelissen pls fix the conflicts |
@richardcornelissen please fix conflicts or we cannot merge |
@richardcornelissen please update the branch or allow writes from maintainers |
@richardcornelissen this PR cannot be merged unless it is up to date with the master branch. |
Plugins have been removed in favor of instrumantion so i'll close this |
Which problem is this PR solving?
Load resolved plugins instead of dynamically importing them.
We're using webpack to pack microservices, which does not include plugins if they're dynamically imported.
Short description of the changes
plugin
property toPluginConfig
in@opentelemetry/api
PluginLoader
load the resolved plugin instead of importing it in@opentelemetry/node