Skip to content

fix: Tempo proxy fails when browser advertises unsupported encodings#908

Open
andreasgerstmayr wants to merge 3 commits into
observatorium:mainfrom
andreasgerstmayr:fix-query-rbac-http-encoding
Open

fix: Tempo proxy fails when browser advertises unsupported encodings#908
andreasgerstmayr wants to merge 3 commits into
observatorium:mainfrom
andreasgerstmayr:fix-query-rbac-http-encoding

Conversation

@andreasgerstmayr

Copy link
Copy Markdown
Contributor

Previously, the reverse proxy forwarded the browser's Accept-Encoding header to Tempo. If the browser advertised an encoding we couldn't decompress (e.g. zstd), the response arrived in that encoding and our ModifyResponse handlers failed to read it.

Now we let gzhttp.Transport set only the encodings it can transparently decompress, removing the manual gzip/deflate decompression in ModifyResponse handlers.

…(e.g. zstd)

Previously, the reverse proxy forwarded the browser's Accept-Encoding
header to Tempo. If the browser advertised an encoding we couldn't
decompress (e.g. zstd), the response arrived in that encoding and
our ModifyResponse handlers failed to read it.

Now we clear Accept-Encoding before the request reaches Tempo and let
gzhttp.Transport set only the encodings it can transparently decompress,
removing the manual gzip/deflate decompression in ModifyResponse handlers.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
pavolloffay
pavolloffay previously approved these changes Jun 23, 2026
@pavolloffay

Copy link
Copy Markdown
Member

The CI failed

@andreasgerstmayr

Copy link
Copy Markdown
Contributor Author

The CI failed

go: github.com/observatorium/api/api/metrics/v1 imports
        github.com/go-openapi/strfmt imports
        go.mongodb.org/mongo-driver/bson: go.mongodb.org/mongo-driver@v1.17.6: read "https://proxy.golang.org/go.mongodb.org/mongo-driver/@v/v1.17.6.zip": stream error: stream ID 165; INTERNAL_ERROR; received from peer
go: github.com/observatorium/api/api/metrics/v1 imports
        github.com/go-openapi/strfmt imports
        go.mongodb.org/mongo-driver/bson/bsontype: go.mongodb.org/mongo-driver@v1.17.6: read "https://proxy.golang.org/go.mongodb.org/mongo-driver/@v/v1.17.6.zip": stream error: stream ID 165; INTERNAL_ERROR; received from peer
go: github.com/observatorium/api/api/metrics/v1 imports
        github.com/go-openapi/strfmt imports
        go.mongodb.org/mongo-driver/bson/primitive: go.mongodb.org/mongo-driver@v1.17.6: read "https://proxy.golang.org/go.mongodb.org/mongo-driver/@v/v1.17.6.zip": stream error: stream ID 165; INTERNAL_ERROR; received from peer
make: *** [Makefile:98: deps] Error 1

Can you restart it?

Comment thread api/traces/v1/http_test.go Outdated
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants