Skip to content

Commit

Permalink
contrib/net/http: retrieve http route and add it to span tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellzy committed Jun 15, 2022
1 parent c293ed8 commit 7978e2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/net/http/trace.go
Expand Up @@ -47,6 +47,7 @@ func TraceAndServe(h http.Handler, w http.ResponseWriter, r *http.Request, cfg *
if cfg.QueryParams {
opts = append(opts, tracer.Tag(ext.HTTPURL, r.URL.Path+"?"+r.URL.RawQuery))
}
opts = append(opts, tracer.Tag(ext.HTTPRoute, r.URL.EscapedPath()))
span, ctx := httptrace.StartRequestSpan(r, opts...)
rw, ddrw := wrapResponseWriter(w)
defer func() {
Expand Down

0 comments on commit 7978e2a

Please sign in to comment.