Auth for metrics, removed unwanted metrics and fixed tests.

This commit is contained in:
2026-03-02 22:30:15 +01:00
parent 6ca3fb8701
commit 8c9cd96213
5 changed files with 41 additions and 43 deletions

View File

@@ -90,10 +90,8 @@ func HTTPMiddleware(logger *slog.Logger, cfg Config) func(http.Handler) http.Han
ww := middleware.NewWrapResponseWriter(w, r.ProtoMajor)
op := metricOperationLabel(r)
metrics.Default.IncHTTPInFlightOp(op)
metrics.Default.IncWorkerPoolActive()
defer func() {
metrics.Default.DecHTTPInFlightOp(op)
metrics.Default.DecWorkerPoolActive()
}()
requestID := middleware.GetReqID(r.Context())
if requestID != "" {