From e8e10e7d61f0bd7ecf51eca4d2a376c6742a50c1 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Wed, 23 Feb 2022 12:09:57 -0800 Subject: [PATCH 1/2] Zipkin Jaeger Exporter fixes --- src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md | 4 ++++ src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs | 3 +++ src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md | 3 +++ src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs | 10 +++++----- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md index 2ad0e3555a9..c39d1d9ce3a 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md @@ -7,6 +7,10 @@ in the [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/9a0a3300c6269c2837a1d7c9c5232ec816f63222/specification/sdk-environment-variables.md?plain=1#L129). ([#2914](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2914)) +* Use SuppressInstrumentationScope in Export method to prevent + internal operations from being instrumented. + ([#2935](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2935)) + ## 1.2.0-rc2 Released 2022-Feb-02 diff --git a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs index 5d57747a57b..4f2022f7190 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs +++ b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs @@ -94,6 +94,9 @@ internal JaegerExporter(JaegerExporterOptions options, TProtocolFactory protocol /// public override ExportResult Export(in Batch activityBatch) { + // Prevent Jaeger's HTTP operations from being instrumented. + using var scope = SuppressInstrumentationScope.Begin(); + try { if (this.Batch == null) diff --git a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md index f3abde43bbc..30e81deec7f 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Modified Export method to catch all exceptions. + ([#2935](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2935)) + ## 1.2.0-rc2 Released 2022-Feb-02 diff --git a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs index 646c13808bd..d13da419d73 100644 --- a/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs +++ b/src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs @@ -60,16 +60,16 @@ public ZipkinExporter(ZipkinExporterOptions options, HttpClient client = null) /// public override ExportResult Export(in Batch batch) { - if (this.LocalEndpoint == null) - { - this.SetLocalEndpointFromResource(this.ParentProvider.GetResource()); - } - // Prevent Zipkin's HTTP operations from being instrumented. using var scope = SuppressInstrumentationScope.Begin(); try { + if (this.LocalEndpoint == null) + { + this.SetLocalEndpointFromResource(this.ParentProvider.GetResource()); + } + var requestUri = this.options.Endpoint; using var request = new HttpRequestMessage(HttpMethod.Post, requestUri) From f4af3925f2738304d77c7534d87343c38a354039 Mon Sep 17 00:00:00 2001 From: Cijo Thomas Date: Wed, 23 Feb 2022 13:08:18 -0800 Subject: [PATCH 2/2] revert jaerge --- src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md | 4 ---- src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md index c39d1d9ce3a..2ad0e3555a9 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md +++ b/src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md @@ -7,10 +7,6 @@ in the [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/9a0a3300c6269c2837a1d7c9c5232ec816f63222/specification/sdk-environment-variables.md?plain=1#L129). ([#2914](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2914)) -* Use SuppressInstrumentationScope in Export method to prevent - internal operations from being instrumented. - ([#2935](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2935)) - ## 1.2.0-rc2 Released 2022-Feb-02 diff --git a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs index 4f2022f7190..5d57747a57b 100644 --- a/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs +++ b/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs @@ -94,9 +94,6 @@ internal JaegerExporter(JaegerExporterOptions options, TProtocolFactory protocol /// public override ExportResult Export(in Batch activityBatch) { - // Prevent Jaeger's HTTP operations from being instrumented. - using var scope = SuppressInstrumentationScope.Begin(); - try { if (this.Batch == null)