From d32ae968141630b2402787a97c5d7bd8076ae13f Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Mon, 21 Jul 2025 18:10:44 +0200 Subject: [PATCH 1/6] deprecate SpanStartOption --- instrumentation/google.golang.org/grpc/otelgrpc/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go index e3b5ff1fcc9..5fdbec0cf69 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -215,6 +215,8 @@ func (o spanStartOption) apply(c *config) { // WithSpanOptions configures an additional set of // trace.SpanOptions, which are applied to each new span. +// +// Deprecated: It is unused in the new [NewClientHandler] implementation for StatsHandlers. func WithSpanOptions(opts ...trace.SpanStartOption) Option { return spanStartOption{opts} } From a42d691c1ceae12e4455d67a59480672ca392c9e Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Mon, 21 Jul 2025 18:19:29 +0200 Subject: [PATCH 2/6] improve deprecation notice Co-authored-by: David Ashpole --- instrumentation/google.golang.org/grpc/otelgrpc/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go index 5fdbec0cf69..0f72819e652 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -216,7 +216,7 @@ func (o spanStartOption) apply(c *config) { // WithSpanOptions configures an additional set of // trace.SpanOptions, which are applied to each new span. // -// Deprecated: It is unused in the new [NewClientHandler] implementation for StatsHandlers. +// Deprecated: It is only used by the deprecated interceptor, and is unused in the new [NewClientHandler] implementation for StatsHandlers. func WithSpanOptions(opts ...trace.SpanStartOption) Option { return spanStartOption{opts} } From 370c8af874ce67ebaf209fcaf7de82d2d5a0dacd Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Mon, 21 Jul 2025 18:25:15 +0200 Subject: [PATCH 3/6] add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a066f1da71..8760d8e0ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add the `WithLoggerProviderOptions`, `WithMeterProviderOptions` and `WithTracerProviderOptions` options to `NewSDK` to allow passing custom options to providers in `go.opentelemetry.io/contrib/otelconf`. (#7552) - Added V2 version of AWS EC2 detector `go.opentelemetry.io/contrib/detectors/aws/ec2/v2` due to deprecation of `github.com/aws/aws-sdk-go`. (#6961) +### Deprecated + +- `WithSpanStartOptions` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` is deprecated. + It is only used by the deprecated interceptor, and is unused in the new [NewClientHandler] implementation for StatsHandlers. (#7601) + ### Removed - Remove support for the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable as well as support for semantic conventions v1.20.0 in the modules below. (#7584) From e45045e1f68f36dfd4a9bdcda7230008a3203192 Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Mon, 21 Jul 2025 18:27:42 +0200 Subject: [PATCH 4/6] fix wrong name of the function --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8760d8e0ff6..dece3d7cecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Deprecated -- `WithSpanStartOptions` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` is deprecated. +- `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 in the new [NewClientHandler] implementation for StatsHandlers. (#7601) ### Removed From 63b8d40b1a3419d5e871869f30fcd80adf9b6829 Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Tue, 22 Jul 2025 19:18:39 +0200 Subject: [PATCH 5/6] improve changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Robert Pająk --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dece3d7cecc..aeb830431ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Deprecated - `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 in the new [NewClientHandler] implementation for StatsHandlers. (#7601) + It is only used by the deprecated interceptor, and is unused by `NewClientHandler` and `NewServerHandler`. (#7601) ### Removed From b2730baaab128bb0ad175bdddc09036061d4bd9b Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Tue, 22 Jul 2025 19:18:59 +0200 Subject: [PATCH 6/6] improve deprecation note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Robert Pająk --- instrumentation/google.golang.org/grpc/otelgrpc/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go index 0f72819e652..a77cf50f1ab 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -216,7 +216,7 @@ func (o spanStartOption) apply(c *config) { // WithSpanOptions configures an additional set of // trace.SpanOptions, which are applied to each new span. // -// Deprecated: It is only used by the deprecated interceptor, and is unused in the new [NewClientHandler] implementation for StatsHandlers. +// Deprecated: It is only used by the deprecated interceptor, and is unused by [NewClientHandler] and [NewServerHandler]. func WithSpanOptions(opts ...trace.SpanStartOption) Option { return spanStartOption{opts} }