Skip to content
Snippets Groups Projects
Commit 520c8598 authored by ale's avatar ale
Browse files

Call HTTP server span names as the request URI path

parent 6d669b91
No related branches found
No related tags found
No related merge requests found
......@@ -168,5 +168,9 @@ func WrapHandler(h http.Handler, endpointAddr string) http.Handler {
if !Enabled {
return h
}
return othttp.NewHandler(h, serviceName)
// Format span names with the request URL path.
return othttp.NewHandler(h, serviceName, othttp.WithSpanNameFormatter(func(op string, r *http.Request) string {
return r.URL.Path
}))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment