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

release-23.1: pkg/metrics: use experimental native histograms. #109837

Closed
wants to merge 1 commit into from

Commits on Aug 31, 2023

  1. pkg/metrics: use native histograms behind an environment flag.

    Optionally enable prometheus native histograms. Native histograms are
    sparse histograms with exponentially spaced buckets that require minimal
    configuration. They are also represented as a single series, rather than
    a series per bucket as for conventional histograms. As a result, native
    histograms typically require less memory and storage and offer higher
    precision relative to conventional histograms.
    
    This patch enables support for native histograms behind the
    COCKROACH_ENABLE_PROMETHEUS_NATIVE_HISTOGRAMS environment variable flag.
    We use a flag because native histograms are currently considered
    experimental in prometheus. To use this feature, set the
    COCKROACH_ENABLE_PROMETHEUS_NATIVE_HISTOGRAMS environment variable to
    "true", and enable native histogram support in prometheus by setting
    --enable-feature=native-histograms in the server arguments. Note that
    crdb exports both conventional and native histograms when native
    histogram support is enabled; prometheus can be configured to scrape
    either or both.
    
    Prometheus native histograms currently only support exponentially spaced
    buckets, so we also limit their use to metrics with an exponential
    distribution. Note that native histograms currently use the protobuf
    exposition format, so we add content negotiation to the prometheus
    exporter.
    
    Epic: https://cockroachlabs.atlassian.net/browse/CC-9716
    
    Release note (ops change): Added support for prometheus native
    histograms behind an environment variable flag.
    jmcarp committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    a454ae1 View commit details
    Browse the repository at this point in the history