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

[Metricbeat] Use histograms type in Prometheus module #14843

Closed
exekias opened this issue Nov 28, 2019 · 0 comments · Fixed by #17061
Closed

[Metricbeat] Use histograms type in Prometheus module #14843

exekias opened this issue Nov 28, 2019 · 0 comments · Fixed by #17061
Labels
enhancement Metricbeat Metricbeat Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team v7.7.0

Comments

@exekias
Copy link
Contributor

exekias commented Nov 28, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Metricbeat Metricbeat Team:Integrations Label for the Integrations team Team:Platforms Label for the Integrations - Platforms team v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants