refactor(pyroscope.write): Forward content-type header only. #3041
+126
−137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We currently forward all incoming headers of the profile /ingest request
to the endpoints defined in
pyroscope.write
.I think this is risky. We already had bugs (like #2201) and there probably
a couple more in there already, as I noticed we send on headers like
Content-Length
.I think we should change this and only forward
Content-Type
, beforeanyone starts relying on this, as this is the only header used:
https://github.com/simonswine/pyroscope/blob/b57274a5acbfa867660938ba7e7f5171c3114d68/pkg/ingester/pyroscope/ingest_handler.go#L132
This is still technically a breaking change, but I think it should go
forward, as the stabililty of the component is only "public-preview"
after all.
Fixes #2612