client_golang
client_golang copied to clipboard
histogram: Find a way of marking a Native Histograms without observations as such
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.
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).
Thoughts @codesome @fstab ?
And empty span seems like the least bad way to do it.