Also one other idea is to do a 2 phase commit. First create a time history record with some default value, and then use the resulting timestamp to update the value.
On Wednesday, September 8, 2021 at 2:18:34 PM UTC-7 Conrad Mukai wrote: > I want to track a metric that depends on the Prometheus timestamp. I know > the rate of change for the metric, but not the metric value. For example, > suppose I have the following metric m: > > m = k * (t1 - t0) > > where t1 is the Prometheus timestamp associated with m, and t0 is the > timestamp of the previous value of the metric. k is a constant that I know > prior to pushing the metric to Prometheus. > > Is it possible to post a metric that can be computed based on timestamp? > An alternative would be to predetermine the timestamp and require that > Prometheus use it when recording the metric. Any suggestions? > > Thanks in advance. > > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f2e1c5eb-7c7a-4bfe-a94d-28b25062cf7fn%40googlegroups.com.

