Skip to content

[Metricbeat] Use histograms type in Prometheus module #14843

@exekias

Description

@exekias

Elasticsearch now supports histograms in its default distribution: elastic/elasticsearch#48580

We can adapt Prometheus module to take benefit from it and store histograms using this type. There are some transformations that are needed when pushing Prometheus histograms:

  • Calculate rates from cumulative counters (this requires us to keep a cache of the previous fetch)
  • Then calculate centroids for buckets with their occurrence count
  • +Inf bucket will require some special treatment

We will still need a fallback option for versions without the histogram type

Some initial tests can be found here: https://gist.github.com/exekias/3860f182169b4fa8f3ea02c82770be55#file-scrape-py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions