sloth
sloth copied to clipboard
Confusing definitions of errorQuery and totalQuery
The definitions of errorQuery and totalQuery according to the comments in the code explicitly mention:
// ErrorQuery is a Prometheus query that will get the number/count of events
// that we consider that are bad for the SLO (e.g "http 5xx", "latency > 250ms"...).
I have a query that gives some timeseries data which I consider are falling in the bad category of events. Since, the definition says it's the count of those events, should I keep errorQuery as errorQuery: count(myQuery)
or shall I keep it as errorQuery: myQuery
itself? Which format is correct?
The same goes for totalQuery
where I am not sure if I need to give an explicit count()
or not?
Could someone please clarify?
Some examples in the repo don't use count()
and that's where the definition I quote above differs.