Opentelemetry-js: Explicit installation of plugins, intended or not?

Created on 14 Nov 2019  路  2Comments  路  Source: open-telemetry/opentelemetry-js

Please answer these questions before submitting a bug report.

What version of OpenTelemetry are you using?

latest

What version of Node are you using?

latest

What did you do?

I tried to initialize a tracer with no config, presuming it would load the required http plugin, however it did not work:

[nodemon] starting `node server.js`
PluginLoader#load: trying loading [email protected]
PluginLoader#load: applying patch to [email protected] using @opentelemetry/plugin-http module
PluginLoader#load: could not load plugin @opentelemetry/plugin-http of module http. Error: Cannot find module '@opentelemetry/plugin-http'

What did you expect to see?

I thought it would be able to fetch @opentelemetry/plugin-http automatically

What did you see instead?

Please see above.

Additional context

Add any other context about the problem here.

This might be intended behaviour, I would like to confirm if we need to explicitly install all modules that will be required by the tracer.

bug

Most helpful comment

This is intentional as far as I am aware. Including all plugins as dependencies would be needlessly wasteful as most applications will use only a small fraction of the plugins. This will become more true as more plugins are added.

All 2 comments

This is intentional as far as I am aware. Including all plugins as dependencies would be needlessly wasteful as most applications will use only a small fraction of the plugins. This will become more true as more plugins are added.

Thanks @dyladan!

Was this page helpful?
0 / 5 - 0 ratings