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

Infer types in Prometheus remote_write API #17675

Closed
exekias opened this issue Apr 11, 2020 · 4 comments · Fixed by #19944
Closed

Infer types in Prometheus remote_write API #17675

exekias opened this issue Apr 11, 2020 · 4 comments · Fixed by #19944
Assignees
Labels
discuss Issue needs further discussion. enhancement Metricbeat Metricbeat Team:Platforms Label for the Integrations - Platforms team v7.10.0

Comments

@exekias
Copy link
Contributor

exekias commented Apr 11, 2020

Describe the enhancement:

We introduced different type behavior (use_types, rate_counters) when using Prometheus collector in 7.7. It would be nice to offer something similar for metrics coming through remote_write, for consistency and users profit.

Remote write API schema is typeless so we would need some heuristics to detect the original type where needed. For instance:

  • Metrics ending up in _bucket with a le label are part of a histogram.
  • Metrics matching *_total are counters. We could make this a configurable regexp list, so users can tweak it to its needs.
@exekias exekias added enhancement discuss Issue needs further discussion. Metricbeat Metricbeat Team:Platforms Label for the Integrations - Platforms team labels Apr 11, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@exekias
Copy link
Contributor Author

exekias commented Apr 11, 2020

would love your thoughts here @ChrsMark

@ChrsMark
Copy link
Member

Sounds good @exekias!

Only note here that this extra "compute" step might have an impact in the performance of remote endpoint. In this we might add an option to disable this type casting if users do not actually need it.

Wondering regarding Point 2 if it would be useful in cases with a lot of timeseries? Would the users be willing to customize that much?

@exekias
Copy link
Contributor Author

exekias commented Apr 15, 2020

Only note here that this extra "compute" step might have an impact in the performance of remote endpoint. In this we might add an option to disable this type casting if users do not actually need it.

Right now collector metricset only has this behavior if enabled by the user (use_types and rate_counters, both disabled by default). So if we match that this will still be optional.

Wondering regarding Point 2 if it would be useful in cases with a lot of timeseries? Would the users be willing to customize that much?

tbh I'm not sure, I would expect a regexp to be fast enough

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

Successfully merging a pull request may close this issue.

4 participants