Proposal: Prometheus Support for Counter "created" Timestamp

280 views
Skip to first unread message

Arthur Silva Sens

unread,
Jun 19, 2023, 4:43:49 PM6/19/23
to Prometheus Developers
Greetings!

Sending a message here to let everyone aware of a proposal that Bartek, Max, Daniel, and I put together: https://docs.google.com/document/d/1kakDVn8aP1JerimLeazuMfy2jaB14W2kZDHMRokPcv4

We're proposing an efficient way to store counter's created timestamps, and an interface to use them. If done correctly, we're aiming to solve these problems:
  • Common problems of uninitialized counters occur. We don’t know when the metric with value 0 started, so the counter starts with an incremented value. This can impact visualization and alerting.

  • It’s possible for rates to be inaccurate for slowly increasing counters and many restarts in between.

  • Finding absolute value for longer metrics is expensive as one has to go sample by sample to detect resets. This impacts ingestors as it requires stateful algorithms that discern between new metrics and long-running ones it did not see before, as well as advanced algorithms like read-level deduplication algorithm in Thanos.


This work is being done as part of Google Summer of Code (issue reference), with a deadline of November of this year. Feedback and comments are appreciated!

Kind regards,
Arthur

Bartłomiej Płotka

unread,
Jul 5, 2023, 6:54:25 AM7/5/23
to Arthur Silva Sens, Ben Kochie, Bjoern Rabenstein, Prometheus Developers
Thanks all for the feedback so far! Especially @Ben Kochie and @Bjoern Rabenstein for ideas and contributions! 💪🏽

We are ready for the second review iteration. The main recent changes involve:

- New proposed solution, the Synthetic-0 append. Please review carefully all details on edge cases and drawback acknowledgements.
- Details around Prometheus proto exposition format proposed changes.
- Elaboration on metadata alternatives.

Kind Regards,
Bartek Płotka (@bwplotka)


--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/e0cbc2f1-4f21-4504-9d55-e41904a971f5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages