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. |
jeremydvoss
left a comment
There was a problem hiding this comment.
Greatly expands distro customizability.
…lemetry#4659) 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.
…lemetry#4659) 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.
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: