Skip to content

Commit

Permalink
Specify handler name for otelhttp (#373)
Browse files Browse the repository at this point in the history
otel uses this as the span display name (must be non-empty).

Signed-off-by: Nghia Tran <[email protected]>
  • Loading branch information
tcnghia authored May 31, 2024
1 parent 0a61ff2 commit 0be8c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/httpmetrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
),
),
Expand Down

0 comments on commit 0be8c9e

Please sign in to comment.