17 Feb 2026 09:36 PM
I'm using flagger for canary deployments, which always makes queries with infinite resolution, in order to resolve the entire query to one number.
I'm trying to make a query that returns the failure rate of a service, based on the outcome dimension of a metric of request length.
My problem is that the metric I'm querying is sometimes null, so I have to use :default(0, always), otherwise:
The metric expression yielded no data points and/or matching dimension tuples for the query timeframe. Consider appending the default transformation (for example, `:default(0)`) to the operands.
But this is incompatible with a resolution of Inf:
Illegal transform operator: Usage of default operator is only supported for resolutions other than `Inf`I'm not able to change flagger to not use the Inf resolution.
My full query:
(
http.server.requests
:filter(
and(
eq("k8s.namespace.name","namespace"),
eq("k8s.workload.name","deployment name"),
ne("outcome","SUCCESS")
)
)
:count
:splitby("k8s.pod.name")
:default(0, always)
/
http.server.requests
:filter(
and(
eq("k8s.namespace.name","namespace"),
eq("k8s.workload.name","deployment name")
)
)
:count
:splitby("k8s.pod.name")
)So how else could I approach this query to get a rate for http.server.requests failures?
Featured Posts