This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (tm *TracedServeMux) AddHandler(pattern string, handler http.Handler) { | |
middleware := nethttp.Middleware(tm.tracer, handler, | |
nethttp.MWSpanObserver(func(span opentracing.Span, r *http.Request) { | |
if !tm.copyBaggage { | |
return | |
} | |
bag := baggage.FromContext(r.Context()) | |
for _, m := range bag.Members() { | |
span.SetBaggageItem(m.Key(), m.Value()) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"parent": "node_0", | |
"child": "node_7", | |
"callCount": 4 | |
}, | |
{ | |
"parent": "node_0", | |
"child": "node_13", | |
"callCount": 10 |
OlderNewer