-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/prometheus] Don't drop Histograms without buckets #23448
[receiver/prometheus] Don't drop Histograms without buckets #23448
Conversation
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
7739331
to
e2eb25c
Compare
I've changed the logic so we ignore the +Inf bucket and always emit at least one Otel bucket based on the total count. I tried to make the logic clearer, but not sure if this is any better in the end. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM
e2eb25c
to
a2d36ad
Compare
a2d36ad
to
e2b9bb9
Compare
This broke unit tests on main, so I am reverting, see #24766. If you have a quick fix @swiatekm-sumo please share it with me and we can get it merged instead :) |
Looks like this is because the original change wasn't rebased on #24032, which moved a bunch of tests around. Should be an easy fix. |
Fixes a failing test from #23448, which wasn't rebased on #24032 before merging. #24032 reorganized prometheus receiver tests for compliance with the openmetrics spec, and in particular made a distinction between data which Prometheus itself accepts, but the receiver doesn't, and data which neither accept. The failing test checks a histogram which wasn't accepted before #23448, but should be accepted now, and this is an intentional consequence of this change. This histogram has a bucket with an invalid label, which is quietly dropped as a result of #24032, but a valid `count`, which makes it a valid histogram due to #23448. This change basically moves the test from the `invalid` group to the `valid` group.
Description:
Prometheus receiver currently drops Histograms without any buckets. These are, however, explicitly allowed by the Otel spec, and can be quite useful. This change allows ingesting them. When we do so, we add an additional bucket at +Inf equal to the
count
attribute of the Histogram.Link to tracking Issue: #22070
Testing:
Modified existing tests.