Skip to content

Commit

Permalink
Zipkin Jaeger Exporter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas committed Feb 23, 2022
1 parent 72ade32 commit e8e10e7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
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();

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

0 comments on commit e8e10e7

Please sign in to comment.