Skip to content

Commit

Permalink
proxy: always count route lookup failures
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 <[email protected]>
  • Loading branch information
AlexanderYastrebov committed Dec 11, 2024
1 parent 010c033 commit 88cca00
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 88cca00

Please sign in to comment.