OTLP exporters should not percent decode the key when parsing HEADERS env vars #5623
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
pkg:exporter:otlp
Related to the OTLP exporter package
The OTLP exporters SHOULD NOT percent decode the header keys when parsing
OTEL_EXPORTER_OTLP_HEADERS
,OTEL_EXPORTER_OTLP_TRACES_HEADERS
,OTEL_EXPORTER_OTLP_METRICS_HEADERS
,OTEL_EXPORTER_OTLP_LOGS_HEADERS
env vars. Moreover, only valid header keys should be parsed.Current behavior:
opentelemetry-go/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
Lines 166 to 170 in 29bdfd2
The specification says https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables:
From W3C Baggage spec https://www.w3.org/TR/baggage/#key:
There is nothing about percent encoding. Only the values are supposed to be percent decoded.
Notice that the implementation should also make sure that only valid key characters are used.
The text was updated successfully, but these errors were encountered: