mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-06-22 01:02:29 +00:00
add otel module based on uptrace-go
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@ -46,7 +46,7 @@ func newService(ctx context.Context, opts ...service.Option) (service.Service, e
|
||||
metrics,
|
||||
logging.New(ctx, logging2.WithFieldsFromContext(func(ctx context.Context) logging2.Fields {
|
||||
if span := trace.SpanContextFromContext(ctx); span.IsSampled() {
|
||||
return logging2.Fields{"traceID", span.TraceID().String()}
|
||||
return logging2.Fields{"traceid", span.TraceID().String(), "spanid", span.SpanID().String()}
|
||||
}
|
||||
return nil
|
||||
})),
|
||||
|
Reference in New Issue
Block a user