Decode URL-encoded headers in environment vars by mattoberle · Pull Request #2312 · open-telemetry/opentelemetry-python

@mattoberle requested a review from a team

December 8, 2021 00:10

@mattoberle

@mattoberle

Unquoting header keys and values **after** calling `str.strip()` opened
the possibility for user encoding errors where a header contained
invalid whitespace. Unquoting **before** `str.strip()` aligns
`opentelemetry-python` with other `opentelemetry-{lang}` libraries that
implemenent URL decoding.
The HTTP exporter allows headers to be provided as `Dict[str, str]`.
The gRPC exporter required headers to be `Sequence[Tuple[str, str]]`.

This commit enables the `Dict[str, str]` format for gRPC.

@srikanthccv

srikanthccv

lzchen

lzchen

lzchen

@mattoberle

@mattoberle