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

Native histogram support in proto spec #256

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Sep 29, 2022

  1. protobuf: Improve naming of oneof fields

    The name after the `oneof` doesn't show up in the explicit getter for
    a particular field, e.g. for the sum of a `HistogramValue` as a
    double, the getter is called `GetDoubleValue` in Go. Nothing in this
    getter tells you that you are getting the sum. For one, this is
    confusing. But you will also get a name collision if any of the other
    fields becomes a `oneof` (e.g. the count for a float histogram). With
    this commit, the getter will be called `GetDoubleSum` etc.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    25319d9 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. protobuf: Add "float histogram" capability

    There are rare use cases of "weighted" or "scaled" histogram, where
    the total count and the count in buckets are actually floating point
    values.
    
    The need for this "float histogram" becomes more obvious with the
    introduction of Native Histograms. With Histograms being first class
    citizens also within Prometheus, a recording rule that outputs
    Histograms will generally output Histograms where the counts are
    floating point numbers again (because PromQL operates on floats only,
    and because the result of a `rate` operation is interpolated and
    therefore not integral anymore, even if the input is). If such a
    result of a recording rule is federated, we need to represent "float
    histograms" in the exposition format.
    
    This commit introduces the "float histogram" capability to the
    conventional Histogram, which is also needed to add Native Histograms
    later.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    da0400b View commit details
    Browse the repository at this point in the history
  2. protobuf: Add native histogram support

    This is still experimental. It is not clear yet how to represent
    native histograms in the text format, but with this commit,
    implementers of OpenMetrics using the protobuf format can already
    gather experience with native histograms.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    f8b5441 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. proto: Add exemplars for native histograms

    This commit mirrors
    prometheus/client_model#80 .
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    cabfdb2 View commit details
    Browse the repository at this point in the history
  2. Fix Makefile and proto file to enable Go code generation

    The proto file was missing the `go_package` option.
    
    Furthermore, the generated Go file was put into the `bin` directory,
    which is weird.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    b8199db View commit details
    Browse the repository at this point in the history