mirror of
https://gitee.com/johng/gf
synced 2026-07-06 21:45:34 +08:00
improve tracing
This commit is contained in:
@ -7,5 +7,4 @@
|
||||
// Package gtree provides concurrent-safe/unsafe tree containers.
|
||||
//
|
||||
// Some implements are from: https://github.com/emirpasic/gods
|
||||
// Thanks!
|
||||
package gtree
|
||||
|
||||
@ -72,7 +72,7 @@ func MiddlewareServerTracing(r *Request) {
|
||||
}
|
||||
span.AddEvent(tracingEventHttpRequest, trace.WithAttributes(
|
||||
label.Any(tracingEventHttpRequestHeaders, httputil.HeaderToMap(r.Header)),
|
||||
label.Any(tracingEventHttpRequestBaggage, gtrace.GetBaggageMap(ctx).Map()),
|
||||
label.Any(tracingEventHttpRequestBaggage, gtrace.GetBaggageMap(ctx)),
|
||||
label.String(tracingEventHttpRequestBody, reqBodyContent),
|
||||
))
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ func (ct *clientTracer) wroteRequest(info httptrace.WroteRequestInfo) {
|
||||
}
|
||||
ct.span.AddEvent(tracingEventHttpRequest, trace.WithAttributes(
|
||||
label.Any(tracingEventHttpRequestHeaders, ct.headers),
|
||||
label.Any(tracingEventHttpRequestBaggage, gtrace.GetBaggageMap(ct.Context).Map()),
|
||||
label.Any(tracingEventHttpRequestBaggage, gtrace.GetBaggageMap(ct.Context)),
|
||||
label.String(tracingEventHttpRequestBody, bodyContent),
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user