Open lmolkova opened 1 year ago
A temporary alternative to https://github.com/open-telemetry/opentelemetry-dotnet/issues/4641 could be using reflection to access OpenTelemetry.SuppressInstrumentationScope
helper.
This would increase the number of AOT warnings, but none of the tracing things work with AOT anyway.
related: #35572, #29955
Library name and version
Azure.Core
Describe the bug
When OTel is configured to collect HTTP spans and Azure SDK spans, we report 2 spans for each HTTP call.
Azure SDK spans are 'better' because:
x-ms-*request-id
values that are used by AzMon to correlate with server-side telemetrySo, we need to find a way to suppress native HTTP client spans.
The problem is not unique to Azure SDK, but there is no otel-wide story for it (https://github.com/open-telemetry/opentelemetry-specification/issues/1767) and each language has its own way to suppress duplicates.
Here's the issue tracking it on OTel .NET side https://github.com/open-telemetry/opentelemetry-dotnet/issues/4641
Expected behavior
Only one span is created per HTTP call
Actual behavior
two spans are created per http call
Reproduction Steps
https://devblogs.microsoft.com/azure-sdk/introducing-experimental-opentelemetry-support-in-the-azure-sdk-for-net/ with latest otel
Environment
No response