Diff between values in series

I have a counter in Metrics that is resetted when the service is restarted so the metrics series could be something like for certain time.

500, 510, 520,550, 10, 20,40

We are moving from Graphite to Prometheus in Graphite the series is transformed using nonNegativeDerivative into 0,10,20,50, 50,60,100.
I.e. we have the cumulative change disregarding the drop when the application is resetted.
What would be the equivalent in Prometheus?

Hi,

Correct me if I’m wrong but the metric is of type Counter, right (at least in Prometheus notation)? If so, functions like increase or rate consider that already (if you’d be to calculate increase on the points, Prometheus will shift the values itself). I’m not sure if you have the ability to display raw data in such a way though.

you can follow this document for calculating diff

Hello, just wanted to check, does my solution work for you, or are you still facing same issues Please contact me if you need any help, I will be happy to help you here