From 0be8c9e5ce8be8934855a30728ed67013ebea1a5 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 31 May 2024 16:53:54 -0700 Subject: [PATCH] Specify handler name for otelhttp (#373) otel uses this as the span display name (must be non-empty). Signed-off-by: Nghia Tran --- pkg/httpmetrics/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/httpmetrics/metrics.go b/pkg/httpmetrics/metrics.go index a6681c8f..40c6dd48 100644 --- a/pkg/httpmetrics/metrics.go +++ b/pkg/httpmetrics/metrics.go @@ -131,7 +131,7 @@ func Handler(name string, handler http.Handler) http.Handler { counter.MustCurryWith(labels), promhttp.InstrumentHandlerResponseSize( responseSize.MustCurryWith(labels), - otelhttp.NewHandler(handler, ""), + otelhttp.NewHandler(handler, name), ), ), ),