Prototype change adding a Authorization Header Setter to OTLP exporters#4432
Prototype change adding a Authorization Header Setter to OTLP exporters#4432DylanRussell wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Setter class to the OTLP exporters.
|
I don't think either this or #4431 need to get in to achieve what you want. For For HTTP exporters, you can use the @aabmass brought the argument that we shouldn't rely on coupling with |
|
You're right I don't need to add any new parameters. |
|
What do you think of adding an exporter customizer environment variable + associated class. The exporter customizer would take an OTLP exporter Class (log or metric or trace, HTTP or GRPC) and return an initialized instance of the class. This way I could pass google credentials and service endpoint into all my exporters by setting a single customizer env variable |
|
Not going with this approach anymore.. |
This is an an alternative approach to #4431.
In order to dynamically set the authorization header a new environment variable (
OTEL_AUTH_HEADER_EXTENSION) is added. The value of the variable must point to a Class provided via entry points that implements this interface:For example for Google we'd do something like:
The advantage to this approach over this one is that the user would only have to specify one auth header extension and it'd automatically get loaded in to all their OTLP exporters, versus having to specify a bunch of custom exporters.