I am using prometheus counter metrics, and each POST call, I increment the counter by custom amount. I am using Datadog to visualize the aggregated value by time interval, and I am having a trouble to query properly.
Say my data points are:
c = Counter('my_counter', 'Description of counter')
t0 (00:00): c.inc(10)
t1 (00:01): c.inc(15)
t2 (00:04): c.inc(12)
t3 (00:05): c.inc(3)
t4 (00:08): c.inc(10)
And if it’s 00:10 currently, if I query
- Past 10m, I should see 50 (t0+t1+…+t4)
- Past 5m, I should see 13 (t3+t4)
- Past 2m, I should see 10 (t4)
I’ve tried Time Series widget but when I look at the counter the number remains for few seconds, for instance 00:00:00 to 00:00:10 is 10.
If I want to achieve render such metrics graph data, should I use something different than Counter
and increase(amount)
?
I have tried different graph in datadog and also grafa query.
user1801323 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.