Skip to content

Commit

Permalink
Suppress instrumentation on export
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed Dec 19, 2020
1 parent 64777d3 commit 382a1da
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public override ExportResult Export(in Batch<Activity> activityBatch)
this.SetResource(this.ParentProvider.GetResource());
}

// Prevents the exporter's gRPC and HTTP operations from being instrumented.
using var scope = SuppressInstrumentationScope.Begin();

OtlpCollector.ExportTraceServiceRequest request = new OtlpCollector.ExportTraceServiceRequest();

request.AddBatch(this.ProcessResource, activityBatch);
Expand Down

0 comments on commit 382a1da

Please sign in to comment.