1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Files
opentelemetry-go/exporters
Robert Pająk 0231f02f59 fix(otlpmetrichttp): replay gzipped bodies on redirect (#8185)
Same as https://github.com/open-telemetry/opentelemetry-go/pull/8152 but
for `otlpmetrichttp`

When gzip compression is enabled, the OTLP metric HTTP client compressed
the request body for the initial send but left GetBody wired to the
original uncompressed protobuf payload.

Any redirect or retry path that rebuilt the request from GetBody could
then resend an uncompressed body while still advertising
Content-Encoding: gzip.

Update GetBody to return the gzipped buffer and add a redirect
regression test that verifies the replayed body matches the original
compressed request and can be decompressed successfully.
2026-04-14 08:53:02 +02:00
..