-
Notifications
You must be signed in to change notification settings - Fork 354
Description
Issue
The usage of SuppressDownstreamInstrumentation isn't supported when used with the rc/stable versions of OpenTelemetry.Instrumentation.Http instrumentation. The limitation comes from the changes introduced in open-telemetry/opentelemetry-dotnet#5077.
SuppressDownstreamInstrumentation relies on OpenTelemetry.Instrumentation.Http instrumentation to avoid overriding the injected ActivityContext by OpenTelemetry.Instrumentation.GrpcNetClient instrumentation. However, since OpenTelemetry.Instrumentation.Http doesn't depend on the SDK, this suppression isn't possible.
As a result, When OpenTelemetry.Instrumentation.GrpcNetClient is used with OpenTelemetry.Instrumentation.Http, the outgoing request will always contain the traceparent header set from ActivityContext of HttpClient Activity instead of GrpcClient Activity .
Workaround
Use beta versions of OpenTelemetry.Instrumentation.Http instrumentation if SuppressDownstreamInstrumentation is needed
Update(4/15): The workaround shared above is not recommended to be used due to GHSA-vh2m-22xx-q94f. Alternate options needs to be further evaluated.