From f5afdbabcc4fa4b534cc3519b4cdf99410e80906 Mon Sep 17 00:00:00 2001 From: Alexander Yastrebov Date: Thu, 12 Dec 2024 12:01:00 +0100 Subject: [PATCH] proxy: always count route lookup failures (#3341) Remove debug mode check for clarity and because other metrics are updated without checking for debug mode. Signed-off-by: Alexander Yastrebov --- proxy/proxy.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/proxy/proxy.go b/proxy/proxy.go index 5c4fe9faca..a024a2cc12 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -1211,10 +1211,7 @@ func (p *Proxy) do(ctx *context, parentSpan ot.Span) (err error) { route, params := p.lookupRoute(ctx) p.metrics.MeasureRouteLookup(lookupStart) if route == nil { - if !p.flags.Debug() { - p.metrics.IncRoutingFailures() - } - + p.metrics.IncRoutingFailures() ctx.Logger().Debugf("could not find a route for %v", ctx.request.URL) p.makeErrorResponse(ctx, errRouteLookupFailed) return errRouteLookupFailed