gsoft-inc / wl-extensions-mediatr

MediatR extensions, behaviors and default configuration.
Apache License 2.0
5 stars 0 forks source link

[TECH-324] Prevent the creation of orphaned spans when using both Application Insights SDK and OpenTelemetry exporter #21

Closed asimmon closed 1 year ago

asimmon commented 1 year ago

Description of the issue:

When using both Application Insights SDK and the OpenTelemetry exporter, we have:

Description of the fix:

Only when using both Application Insights SDK and the OpenTelemetry exporter, use the overload of TelemetryClient.StartOperation(...) that accepts an activity as a parameter. When providing our own custom activity, Application Insights SDK will make sure to fix the parent-child span relationship.