fix:duplicate copy MD (#2304)

master
maizige 2 years ago committed by GitHub
parent 93584c6ca6
commit 05007c86bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -153,11 +153,8 @@ func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) {
}
func startSpan(ctx context.Context, method, target string) (context.Context, trace.Span) {
var md metadata.MD
requestMetadata, ok := metadata.FromOutgoingContext(ctx)
if ok {
md = requestMetadata.Copy()
} else {
md, ok := metadata.FromOutgoingContext(ctx)
if !ok {
md = metadata.MD{}
}
tr := otel.Tracer(ztrace.TraceName)

Loading…
Cancel
Save