Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyroscope.receive_http treats headers inconsistently #2612

Open
simonswine opened this issue Feb 4, 2025 · 1 comment · May be fixed by #3041
Open

pyroscope.receive_http treats headers inconsistently #2612

simonswine opened this issue Feb 4, 2025 · 1 comment · May be fixed by #3041
Labels
area/pyroscope Issues/PRs primarly affecting `pyroscope.` components needs-attention

Comments

@simonswine
Copy link
Contributor

pyroscope.receive_http supports forwarding pushv1 and ingest handler.

For the pushv1 non of the headers are forwarded, while the ingest handler forwards all but a block list of headers:

https://github.com/simonswine/alloy/blob/755bcfcb5ab193488a226f467216b93ce98c6cd1/internal/component/pyroscope/write/write.go#L45-L52

I suggest we should only forward headers, that are important for parsing of the profiles, which includes:

@simonswine simonswine changed the title pyroscope.receive_http treats headers in consistentl pushv1 support the connect go handlers pyroscope.receive_http treats headers inconsistently Feb 4, 2025
@simonswine simonswine added the area/pyroscope Issues/PRs primarly affecting `pyroscope.` components label Feb 4, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

simonswine added a commit to simonswine/alloy that referenced this issue Mar 20, 2025
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 grafana#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`, before
anyone 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 grafana#2612
simonswine added a commit to simonswine/alloy that referenced this issue Mar 20, 2025
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 grafana#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`, before
anyone 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 grafana#2612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pyroscope Issues/PRs primarly affecting `pyroscope.` components needs-attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant