1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

warden fix trace (#300)

This commit is contained in:
Felix Hao 2019-08-27 15:26:05 +08:00 committed by GitHub
parent 43902c3d19
commit a83992e6dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,6 +111,7 @@ func (s *Server) handle() grpc.UnaryServerInterceptor {
var t trace.Trace
cmd := nmd.MD{}
if gmd, ok := metadata.FromIncomingContext(ctx); ok {
t, _ = trace.Extract(trace.GRPCFormat, gmd)
for key, vals := range gmd {
if nmd.IsIncomingKey(key) {
cmd[key] = vals[0]