-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
histogram: Find a way of marking a Native Histograms without observations as such #1127
Comments
How about we require to add a no-op span (length zero) in this case? Those spans are legal, and will be compacted away, but we could use them as the ultimate marker for a native histogram (just for the special case of a histogram without any observations yet and a zero threshold of zero). |
And empty span seems like the least bad way to do it. |
beorn7
added a commit
that referenced
this issue
Jul 20, 2023
Fixes #1127. If a native histogram has no observations and a zero threshold of zero, then it is indistinguishable from a classic histogram. To give scrapers a hint that it is indeed a native histogram, we add a no-op span. This needs follow-up PRs in prometheus/prometheus and prometheus/client_model. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
that referenced
this issue
Jul 20, 2023
Fixes #1127. If a native histogram has no observations and a zero threshold of zero, then it is indistinguishable from a classic histogram. To give scrapers a hint that it is indeed a native histogram, we add a no-op span. This needs follow-up PRs in prometheus/prometheus and prometheus/client_model. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
to prometheus/client_model
that referenced
this issue
Jul 20, 2023
See prometheus/client_golang#1127 for details. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
to prometheus/prometheus
that referenced
this issue
Jul 20, 2023
Native histograms without observations and with a zero threshold of zero look the same as classic histograms in the protobuf exposition format. According to prometheus/client_golang#1127 , the idea is to add a no-op span to those histograms to mark them as native histograms. This commit enables Prometheus to detect that no-op span and adds a doc comment to the proto spec describing the behavior. Signed-off-by: beorn7 <beorn@grafana.com>
This was referenced Jul 20, 2023
beorn7
added a commit
to prometheus/prometheus
that referenced
this issue
Jul 20, 2023
Native histograms without observations and with a zero threshold of zero look the same as classic histograms in the protobuf exposition format. According to prometheus/client_golang#1127 , the idea is to add a no-op span to those histograms to mark them as native histograms. This commit enables Prometheus to detect that no-op span and adds a doc comment to the proto spec describing the behavior. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
to prometheus/client_model
that referenced
this issue
Jul 20, 2023
See prometheus/client_golang#1127 for details. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
to prometheus/prometheus
that referenced
this issue
Jul 20, 2023
Native histograms without observations and with a zero threshold of zero look the same as classic histograms in the protobuf exposition format. According to prometheus/client_golang#1127 , the idea is to add a no-op span to those histograms to mark them as native histograms. This commit enables Prometheus to detect that no-op span and adds a doc comment to the proto spec describing the behavior. Signed-off-by: beorn7 <beorn@grafana.com>
beorn7
added a commit
to prometheus/prometheus
that referenced
this issue
Jul 26, 2023
Native histograms without observations and with a zero threshold of zero look the same as classic histograms in the protobuf exposition format. According to prometheus/client_golang#1127 , the idea is to add a no-op span to those histograms to mark them as native histograms. This commit enables Prometheus to detect that no-op span and adds a doc comment to the proto spec describing the behavior. Signed-off-by: beorn7 <beorn@grafana.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is a good thing if the format can expose the conventional and the native version of a histogram side by side. But if a native histogram has a zero threshold of zero and zero observations yet, it might easily look like it’s not a native histogram at all, so Prometheus might ingest it assuming it’s a conventional histogram, which gets weird once it has actually received observations and Prometheus starts to ingest it as a native histogram. See code for details.
This is P2 as explained in the milestone's description.
The text was updated successfully, but these errors were encountered: