You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generic rules (pyrra_requests/errors_total) cause incorrect calculation in Grafana sum(rate(sum(metric)) instead of sum(rate(metric) that lead to spikes when one of counter resetting.
@sergeyshevch are you able overcome this by changing the expr in the panel? I tried to use quantile_over_time but it doesn't work with vector data. I think this has to be fixed in Pyrra generic rules code
Pyrra should store rate/increase data instead of sum than it will be fixed.
I've done query for workaround on similar case but it will only work on VictoriaMetrics
Generic rules (pyrra_requests/errors_total) cause incorrect calculation in Grafana
sum(rate(sum(metric))
instead ofsum(rate(metric)
that lead to spikes when one of counter resetting.Article with explanation: https://www.robustperception.io/rate-then-sum-never-sum-then-rate/
Panel from SLO Detail dashboard:
![Screenshot 2023-11-14 at 13 18 02](https://private-user-images.githubusercontent.com/15252187/282757852-8267c16d-f037-4692-8aaa-4e2e3bfa1f41.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MTIxMjYsIm5iZiI6MTcyMTYxMTgyNiwicGF0aCI6Ii8xNTI1MjE4Ny8yODI3NTc4NTItODI2N2MxNmQtZjAzNy00NjkyLThhYWEtNGUyZTNiZmExZjQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDAxMzAyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM4NGE2NTE5MGIzY2Y2ZDBmZGYyNTQ5Y2NlMDE2MmIzNTFhZmE2NmQzMGQyNDg5YmNhZmIyOTczNmNmM2U3MjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.izLeIjFxTxkVWhik6q5gPjgFZE5_wkQhL1RWhO1FOVs)
Graph with comparison to correct metric calculation
![Screenshot 2023-11-14 at 13 19 01](https://private-user-images.githubusercontent.com/15252187/282758123-e45c7143-d4f7-4861-82a7-7648936cb2b7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MTIxMjYsIm5iZiI6MTcyMTYxMTgyNiwicGF0aCI6Ii8xNTI1MjE4Ny8yODI3NTgxMjMtZTQ1YzcxNDMtZDRmNy00ODYxLTgyYTctNzY0ODkzNmNiMmI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDAxMzAyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkyMjQ4NjY0MmNjODY0NjRlZGUzMTdhN2RmODAwZmY2NTYwYjllNGMyMTgyZTdhMzNkZjdmYWQ3NGRiNDU1ODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.aJiuOsDMBc6dk1jsVil5bn_BhyK58wSy-uv-3YQVds4)
Is it possible to overtake such issues in any way? Maybe store sum(rate() instead of sum and call metric as pyrra_requests_rate?
The text was updated successfully, but these errors were encountered: