I want to count how often a user opens a dialog in a frontend and send the results to the prometheus pushgateway.
The problem is that once the gateway restarts the metrics are gone and I can not sum the values properly.
The rate function seems not to fit for this purpose.
Is there the possibility to sum over time, no matter there where restarts or not?
Here is the sum query but shows not what I expect.
maybe sum_over_time could do it if I group them, but if I add the by clause it throws an error.