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

Merge sparsehistogram branch into master #63

Merged
merged 13 commits into from Oct 18, 2022
Merged

Merge sparsehistogram branch into master #63

merged 13 commits into from Oct 18, 2022

Commits on Apr 6, 2020

  1. Experimental encoding for sparse buckets in histogram

    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Apr 6, 2020
    Copy the full SHA
    4b803f3 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

  1. Copy the full SHA
    24db95a View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2021

  1. Copy the full SHA
    8831f0d View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2021

  1. Switch to base 2 and powers of 2 for resolution

    This follows what looks to be the winning proposal in
    open-telemetry/oteps#149
    
    See more detail in upcoming commit for prometheus/client_golang.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Jun 11, 2021
    Copy the full SHA
    bbaf1cc View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2021

  1. Merge pull request #47 from prometheus/beorn7/histogram

    Switch to base 2 and powers of 2 for resolution
    beorn7 committed Jun 24, 2021
    Copy the full SHA
    61b6c1a View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Copy the full SHA
    408689d View commit details
    Browse the repository at this point in the history
  2. Add float histograms and gauge histograms to proto spec

    Note that this is only an extension of the proto spec. Both generators
    and consumers of the protobuf still need changes to make use of these
    changes.
    
    Gauge histograms measure current distributions. For one, they are
    inspired by the GaugeHistogram type introducted by OpenMetrics, see
    https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#gaugehistogram
    
    They are also handled in the same way as OpenMetrics does it, by
    using a new MetricType enum field GAUGE_HISTOGRAM, but not changing
    anything else, i.e. for both regular and gauge histograms, the same
    Histogram message type is used.
    
    The other reason why we need gauge histograms comes from PromQL: If
    you `rate` a histogram (which is possible with the new sparse
    histograms as 1st class data type), the result is a gauge histogram. A
    rate'd histogram can be created by a recording rule and then stored in
    the TSDB. From there, it can be exposed by federation, so we need to
    be able to represent it in the exposition format.
    
    Float histograms are histograms where all counts (count of
    observations, counts in each bucket, zero bucket count) are floating
    point numbers rather than integer numbers. They are rarely needed for
    direct instrumentation. Use cases are weighted histograms or timing
    histograms, see kubernetes/kubernetes#109277
    for a real-world example.
    
    However, float histograms happen all the time as results of PromQL
    expressions. Following the same line of argument as above, those float
    histograms can end up in the TSDB via recording rules, which means
    they can be exposed via federation.
    
    Note that float histograms are implicitly supported by the original
    Prometheus text format, as this format simply uses floating point
    numbers for all sample values. OpenMetrics has avoided this ambiguity
    and has specified integers for bucket counts and the count of
    observations in a histogram, which means it needs to be extended to
    support float histograms, similar to how this commit extends the
    original Prometheus protobuf format.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Jun 14, 2022
    Copy the full SHA
    8171e83 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Explain Span layout better

    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Jun 19, 2022
    Copy the full SHA
    0da3265 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Merge pull request #58 from prometheus/beorn7/histogram

    Add float histograms and gauge histograms to proto spec
    beorn7 committed Jun 29, 2022
    Copy the full SHA
    421ad2b View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

  1. Flatten the buckets of native histograms

    This is slightly more efficient on the wire, and it matches the way
    the corresponding Go types are structured (`histogram.Histogram` and
    `histogram.FloatHistogram`). This follow the change for the
    remote-write protobuf in
    prometheus/prometheus#11011 .
    
    This commit also moves away from the "sparse histogram" naming in lieu
    of the preferred name "native histogram".
    
    Note that this is deliberately an incompatible change of the proto
    spec. Keeping compatibility would cause some hassle but not much gain
    because we haven't published the proto spec in any release yet and
    always marked it as experimental. Compatibility to the released proto
    spec (without native histograms) is kept, of course.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Jul 14, 2022
    Copy the full SHA
    a7ff713 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2022

  1. Merge pull request #59 from prometheus/beorn7/histogram

    Flatten the buckets of native histograms
    beorn7 committed Jul 19, 2022
    Copy the full SHA
    1f8dcad View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Add note about experimental state of native histograms

    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Oct 11, 2022
    Copy the full SHA
    7f720d2 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

  1. Add note about native histograms to README

    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Oct 12, 2022
    Copy the full SHA
    fdb567d View commit details
    Browse the repository at this point in the history