-
Notifications
You must be signed in to change notification settings - Fork 717
opentelemetry-sdk: pass exporter args from sdk configuration #4659
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
opentelemetry-sdk: pass exporter args from sdk configuration #4659
Conversation
This permits to pass exporter specific arguments when initialized by the sdk passing a map using the exporter class as key and a map of arguments as value.
I think this design seems to make sense with the existing code! The previous changes I made allow for Provider-level configuration like Samplers and ID Generators. But until now the only way to configure exporters in autoinstrumentation has been env vars. This would allow Distros (or rather, configurators) to override the |
The behavior is not changed by default, an empty dict will be passed to exporters as we're currently doing so I don't expect any breakage. The content of the options passed to exporters has been made per exporter class to be as narrow as possible and avoid unexpected params. |
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.
Greatly expands distro customizability.
Description
This permits to pass exporter specific arguments when initialized by the sdk passing a map using the exporter class as key and a map of arguments as value.
While at it also enable typechecking in the sdk.configuration module.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: