Skip to content

chore: fix missleading errors total grafana #969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jmichalek132
Copy link

Simplest, but not necessarily the best way to fix #968 968

@@ -529,7 +529,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(rate(pyrra_requests_total{slo=\"$slo\"}[$__rate_interval]))",
"expr": "sum(rate(pyrra_requests:rate5m{slo=\"$slo\"}[$__rate_interval]))",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make that much sense anymore. Given we already have the :rate5m we don't need to do anything except pyrra_requests:rate5m{slo=\"$slo\"}.
I guess we'll lose the flexibility to use rate[$__rate_interval] but being correct is more important.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could have multiple rate interval pre-computed i.e. rate5m, rate1h, rate1d, how about that?

@@ -598,7 +598,7 @@
}
]
},
"unit": "percentunit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep the RED (Requests, Error Rate, Duration) type of panels, how about actually using the error rate percentage?

@jmichalek132 jmichalek132 marked this pull request as ready for review December 10, 2023 13:30
@metalmatze
Copy link
Member

I'm looking at this again.
The way it's handled today is definitely incorrect.

Given that we do similar things for the other queries, I wonder if we can construct a query (using the objectiveReplacer) that renames the metric to the generic name and either keeps all the labels as they are or somehow only keeps the distinct labels. This would allow us to be flexible with the queries later on.

I prefer to keep only distinct labels; however, keeping all labels and then later summing them away doesn't seem too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyrra_errors_total inaccurate in Grafana dashboard
2 participants