Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Po-Yao Chen committed Nov 14, 2024
1 parent 8d327af commit 1cff31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otellib/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (h *httpMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
labeler, _ := otelhttp.LabelerFromContext(r.Context())
// Add the http.target attribute to the OTel labeler.
if r.URL != nil {
labeler.Add(semconv.HTTPTargetKey.String(r.URL.RequestURI()))
labeler.Add(semconv.HTTPRouteKey.String(r.URL.RequestURI()))
}
defer func() {
if rec := recover(); rec != nil {
Expand Down

0 comments on commit 1cff31a

Please sign in to comment.