Skip to content

Commit

Permalink
proxy: always count route lookup failures (#3341)
Browse files Browse the repository at this point in the history
Remove debug mode check for clarity and because
other metrics are updated without checking for debug mode.

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov authored Dec 12, 2024
1 parent 010c033 commit f5afdba
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5afdba

Please sign in to comment.