Skip to content

Instantly share code, notes, and snippets.

View yurishkuro's full-sized avatar

Yuri Shkuro yurishkuro

View GitHub Profile
@yurishkuro
yurishkuro / tracing.go
Created February 8, 2023 23:10
HotROD external baggage
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())
}
@yurishkuro
yurishkuro / graph-15-nodes.json
Created November 21, 2023 15:52
Dependencies 15 nodes
[
{
"parent": "node_0",
"child": "node_7",
"callCount": 4
},
{
"parent": "node_0",
"child": "node_13",
"callCount": 10