Logger: Add feature toggle for errors in HTTP request logs (#64425)

This commit is contained in:
Emil Tullstedt
2023-03-31 15:38:09 +02:00
committed by GitHub
parent 977a7e9a55
commit be9361cb9e
19 changed files with 488 additions and 199 deletions

View File

@@ -63,7 +63,7 @@ func RequestMetrics(features featuremgmt.FeatureToggles) web.Middleware {
handler := "unknown"
// TODO: do not depend on web.Context from the future
if routeOperation, exists := routeOperationName(web.FromContext(r.Context()).Req); exists {
if routeOperation, exists := RouteOperationName(web.FromContext(r.Context()).Req); exists {
handler = routeOperation
} else {
// if grafana does not recognize the handler and returns 404 we should register it as `notfound`