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

OM 2.0: Created Timestamps text exposition format #285

Open
ArthurSens opened this issue Dec 9, 2024 · 1 comment
Open

OM 2.0: Created Timestamps text exposition format #285

ArthurSens opened this issue Dec 9, 2024 · 1 comment

Comments

@ArthurSens
Copy link
Member

When implementing Created Timestamp support in Prometheus OM's parser, we've faced many challenges with the current format:

  1. If the parser was not ready to parse created timestamps, how they are exposed looks precisely the same as how a usual metric looks. CT would be ingested as a metric and could lead to a 50% increase in metric ingestion if the target exposes mainly counters.
  2. Since they look like metrics, parsers need extra logic to differentiate actual metrics that end with the _created suffix.
  3. No strict ordering requires state handling for complex metric types like histograms and summaries.

We'd love to address all these problems with OpenMetrics 2.0. In the last Prometheus CT WG call, we discussed OM for a bit and came up with the following ideas:

  1. Expose CT similarly to the way we expose metadata (with a comment):
# TYPE example_metric counter
# HELP example_metric An example counter with a created timestamp
# CT example_metric 1234
example_metric 1
# CT example_metric{foo="bar"} 4312
example_metric{foo="bar"} 2
  1. Expose CT inline with the metric
# TYPE example_metric counter
# HELP example_metric An example counter with a created timestamp
example_metric 1 ct1234
example_metric{foo="bar"} 2 ct4312

We're opening this issue to discuss both ideas or new ones if anyone is thinking of another approach.

@bwplotka
Copy link
Member

Proposal @Maniktherana created prometheus/proposals#43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants