Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zipkin Exporter fixes #2935

Merged
merged 2 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ internal JaegerExporter(JaegerExporterOptions options, TProtocolFactory protocol
/// <inheritdoc/>
public override ExportResult Export(in Batch<Activity> activityBatch)
{
// Prevent Jaeger's HTTP operations from being instrumented.
using var scope = SuppressInstrumentationScope.Begin();
cijothomas marked this conversation as resolved.
Show resolved Hide resolved

try
{
if (this.Batch == null)
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ public ZipkinExporter(ZipkinExporterOptions options, HttpClient client = null)
/// <inheritdoc/>
public override ExportResult Export(in Batch<Activity> 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)
Expand Down