-
Notifications
You must be signed in to change notification settings - Fork 682
Open
Labels
Milestone
Description
Blocked by #7687
Blocked by https://github.com/open-telemetry/opentelemetry-go-contrib/milestone/32
opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
Lines 42 to 51 in 73fe37d
// Inject injects correlation context and span context into the gRPC | |
// metadata object. This function is meant to be used on outgoing | |
// requests. | |
// Deprecated: Unnecessary public func. | |
func Inject(ctx context.Context, md *metadata.MD, opts ...Option) { | |
c := newConfig(opts) | |
c.Propagators.Inject(ctx, &metadataSupplier{ | |
metadata: *md, | |
}) | |
} |
opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
Lines 64 to 75 in 73fe37d
// Extract returns the correlation context and span context that | |
// another service encoded in the gRPC metadata object with Inject. | |
// This function is meant to be used on incoming requests. | |
// Deprecated: Unnecessary public func. | |
func Extract(ctx context.Context, md *metadata.MD, opts ...Option) (baggage.Baggage, trace.SpanContext) { | |
c := newConfig(opts) | |
ctx = c.Propagators.Extract(ctx, &metadataSupplier{ | |
metadata: *md, | |
}) | |
return baggage.FromContext(ctx), trace.SpanContextFromContext(ctx) | |
} |