-
Notifications
You must be signed in to change notification settings - Fork 825
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
Proposal: Plugin configuration options #214
Comments
I would add the option to specify the package for each plugin in order to customize if needed. It will reduce possible frustrations. |
@OlivierAlbertini Hmm, I agree. What do you think about below configs? Instead of having the same options on each plugin I tried to take it out from the plugins which means (for example) OPTION 2
|
I prefer your previous version:
But I would add: pluginLoader.load({
http: { enabled: true, package: "@opentelemetry/plugin-http", ignoreMethods: ['POST'], ignoreUrls: ['/ignored/string'] },
mongodb: { enabled: true, package: "@macompany/plugin-mongodb", enhancedDatabaseReporting: true },
grpc: { enabled: false },
}); and we could provide an interface that specify all accepted plugins: |
Second option looks more elegant to me, but it does not offer plugin level config/option. Do we expect users to use config based on plugin like enhancedDatabaseReporting |
From a user perspective, I don't want to read all PluginConfig fields to see if it's useful or not for grpc plugin (particularly if I use only grpc plugin). What do you pass to the plugin itself.. the hole PluginConfig ? |
In case of OPTION 1: specific plugin config.
In case of OPTION 1:
|
This is my initial proposal to kick of the discussion on plugin configurations.
Currently,
PluginConfig
accepts value with only bolean flag. Iftrue
, plugin is loaded otherwise skip it.PluginOptions
designed to pass configuration options to each plugins. All fields are optional. We can have some defaultConfig with default configuration values.TODO Pointer:
opentelemetry-js/packages/opentelemetry-node-tracer/src/instrumentation/PluginLoader.ts
Line 33 in b208b2b
Usage Example:
OPTION 1
Related Issues: #210
These are just initial options, feel free to add/suggest others. I am also open to discuss other perspectives.
The text was updated successfully, but these errors were encountered: