-
Notifications
You must be signed in to change notification settings - Fork 795
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
Create meta package with default instrumentations so they can be passed automatically #1824
Comments
Is |
so this can be array of InstrumentationBase or array of Instrumentation etc. |
Why not flatten the list though? const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const defaultNodeCoreInstrumentations = require('@opentelemetry/instrumentation-core-node-defaults');
registerInstrumentations({
instrumentations: [
...defaultNodeCoreInstrumentations,
],
}); Also it seems like an unnecessary redirection to require the user to install 2 packages. Why not just do this? const defaultNodeCoreInstrumentations = require('@opentelemetry/instrumentation-core-node-defaults');
// this options object can have useful types now :)
const options = {/* */};
defaultNodeCoreInstrumentations.enable(options); |
too complicated. This must be compatible with already existing loader so you provide them the same way you would do it manually when adding package one by one including old plugins etc.
|
Why would it be too complicated?
|
You aware that we already have a new autoloader |
My example would call the autoloader "behind the scenes". No need for the user to call it themselves unless they have special requirements. |
how ?, you are loading plugins and instrumentations once with |
and just a reminder of the thing that was implemented |
I remember what was implemented, but I thought it was only temporary while we make the transition to instrumentations. Once we are using new instrumentations everywhere there is no need to have a loader anymore. |
Closing since it has been implemented on the instrumentation package |
Something like this
The text was updated successfully, but these errors were encountered: