diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b3c7215a17..2f4bdeeb8cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - `WithSpanOptions` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` is deprecated. It is only used by the deprecated interceptor, and is unused by `NewClientHandler` and `NewServerHandler`. (#7601) +- `Extract` and `Inject` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` are deprecated. + These functions were initially exposed in the public API, but are now considered unnecessary. (#7689) ### Removed diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go b/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go index 2c2b721fadb..05ab163a2e3 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go @@ -42,6 +42,7 @@ func (s *metadataSupplier) Keys() []string { // 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) @@ -64,6 +65,7 @@ func inject(ctx context.Context, propagators propagation.TextMapPropagator) cont // 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)