We have 3 otel consumers in our backends, all of which need the same basic auth password.
Currently, its really messy.
In the environment, we set OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic%20SECRET", i.e urlencoded value.
This works for the otel client in jobrunner.
IT doesn't work for the otel-collector, which we set a separate variable COLLECTOR_BASIC_AUTH=SECRET, and manually interpolate that in the collector config yaml as "Basic ${COLLECTOR_BASIC_AUTH}"
We've recently added otel-cli, which doesn't like the fact that OTEL_EXPORTER_OTLP_HEADERS value is urlencoded, and needs it plain.
The idea was we'd just set OTEL_EXPORTER_OTEP_HEADERS once and be done with it, but it seems that was wishful thinking.
We should try and harmonise this config, so there's only one place to set the new value, and all the cosnumers get it in the form they want.
We have 3 otel consumers in our backends, all of which need the same basic auth password.
Currently, its really messy.
In the environment, we set
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic%20SECRET", i.e urlencoded value.This works for the otel client in jobrunner.
IT doesn't work for the otel-collector, which we set a separate variable
COLLECTOR_BASIC_AUTH=SECRET, and manually interpolate that in the collector config yaml as"Basic ${COLLECTOR_BASIC_AUTH}"We've recently added
otel-cli, which doesn't like the fact that OTEL_EXPORTER_OTLP_HEADERS value is urlencoded, and needs it plain.The idea was we'd just set
OTEL_EXPORTER_OTEP_HEADERSonce and be done with it, but it seems that was wishful thinking.We should try and harmonise this config, so there's only one place to set the new value, and all the cosnumers get it in the form they want.