From 2c5c034ec6a1bf78164d684088b60ab7d9b3ceec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 18 Sep 2023 20:05:13 +0200 Subject: [PATCH] [OpenTracing.Shim] Remove obsolete constructor (#4862) --- .../.publicApi/net462/PublicAPI.Unshipped.txt | 1 - .../.publicApi/net6.0/PublicAPI.Unshipped.txt | 1 - .../netstandard2.0/PublicAPI.Unshipped.txt | 1 - src/OpenTelemetry.Shims.OpenTracing/CHANGELOG.md | 5 +++++ src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs | 12 ------------ 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net462/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net462/PublicAPI.Unshipped.txt index b0ed15509e..90f671f8a1 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net462/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net462/PublicAPI.Unshipped.txt @@ -4,6 +4,5 @@ OpenTelemetry.Shims.OpenTracing.TracerShim.BuildSpan(string operationName) -> Op OpenTelemetry.Shims.OpenTracing.TracerShim.Extract(OpenTracing.Propagation.IFormat format, TCarrier carrier) -> OpenTracing.ISpanContext OpenTelemetry.Shims.OpenTracing.TracerShim.Inject(OpenTracing.ISpanContext spanContext, OpenTracing.Propagation.IFormat format, TCarrier carrier) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.ScopeManager.get -> OpenTracing.IScopeManager -OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.Tracer tracer, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void diff --git a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net6.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net6.0/PublicAPI.Unshipped.txt index b0ed15509e..90f671f8a1 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net6.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/net6.0/PublicAPI.Unshipped.txt @@ -4,6 +4,5 @@ OpenTelemetry.Shims.OpenTracing.TracerShim.BuildSpan(string operationName) -> Op OpenTelemetry.Shims.OpenTracing.TracerShim.Extract(OpenTracing.Propagation.IFormat format, TCarrier carrier) -> OpenTracing.ISpanContext OpenTelemetry.Shims.OpenTracing.TracerShim.Inject(OpenTracing.ISpanContext spanContext, OpenTracing.Propagation.IFormat format, TCarrier carrier) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.ScopeManager.get -> OpenTracing.IScopeManager -OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.Tracer tracer, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void diff --git a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt index b0ed15509e..90f671f8a1 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/OpenTelemetry.Shims.OpenTracing/.publicApi/netstandard2.0/PublicAPI.Unshipped.txt @@ -4,6 +4,5 @@ OpenTelemetry.Shims.OpenTracing.TracerShim.BuildSpan(string operationName) -> Op OpenTelemetry.Shims.OpenTracing.TracerShim.Extract(OpenTracing.Propagation.IFormat format, TCarrier carrier) -> OpenTracing.ISpanContext OpenTelemetry.Shims.OpenTracing.TracerShim.Inject(OpenTracing.ISpanContext spanContext, OpenTracing.Propagation.IFormat format, TCarrier carrier) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.ScopeManager.get -> OpenTracing.IScopeManager -OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.Tracer tracer, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider) -> void OpenTelemetry.Shims.OpenTracing.TracerShim.TracerShim(OpenTelemetry.Trace.TracerProvider tracerProvider, OpenTelemetry.Context.Propagation.TextMapPropagator textFormat) -> void diff --git a/src/OpenTelemetry.Shims.OpenTracing/CHANGELOG.md b/src/OpenTelemetry.Shims.OpenTracing/CHANGELOG.md index 4258ae1390..f540df67e0 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/CHANGELOG.md +++ b/src/OpenTelemetry.Shims.OpenTracing/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +* Remove obsolete `TracerShim(Tracer, TextMapPropagator)` constructor. + Use `TracerShim(TracerProvider)` + or `TracerShim(TracerProvider, TextMapPropagator)` constructors. + ([#4862](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4862)) + ## 1.6.0-beta.1 Released 2023-Sep-05 diff --git a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs index cb1bd5e895..280cac2afa 100644 --- a/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs +++ b/src/OpenTelemetry.Shims.OpenTracing/TracerShim.cs @@ -42,18 +42,6 @@ public TracerShim(Trace.TracerProvider tracerProvider, TextMapPropagator textFor this.ScopeManager = new ScopeManagerShim(); } - [Obsolete("Use TracerShim(TracerProvider, TextMapPropagator) or TracerShim(TracerProvider) constructor.")] - - public TracerShim(Trace.Tracer tracer, TextMapPropagator textFormat) - { - Guard.ThrowIfNull(tracer); - Guard.ThrowIfNull(textFormat); - - this.tracer = tracer; - this.definedPropagator = textFormat; - this.ScopeManager = new ScopeManagerShim(); - } - /// public global::OpenTracing.IScopeManager ScopeManager { get; }