feat tracer

This commit is contained in:
2026-01-25 17:16:51 +08:00
parent 81e422d304
commit f22d22cbdc

View File

@@ -34,7 +34,7 @@ func (s *Base) LoggingInterceptor(ctx context.Context, req interface{}, info *gr
} }
} }
_, span := otel.Tracer(s.ServiceName).Start(ctx, info.FullMethod) _, span := otel.Tracer("grpc.interceptor.logging").Start(ctx, info.FullMethod)
defer span.End() defer span.End()
reqString := fmt.Sprintf("[usn:%v] method: %s, Request: %v", usn, info.FullMethod, req) reqString := fmt.Sprintf("[usn:%v] method: %s, Request: %v", usn, info.FullMethod, req)