apm-agent-dotnet icon indicating copy to clipboard operation
apm-agent-dotnet copied to clipboard

Elastic.Apm for .net breaks traces

Open incloudss opened this issue 2 years ago • 0 comments

Describe the bug Elastic.Apm interferes with default .net diagnostic activity behaviour and breaks traces. Versions checked: 1.23.0, 1.24.0, 1.25.0 Here is the jaeger visualization of good trace (using OpenTelemetry), and the broken one by Elastic.Apm:

Good: image

Broken: image

To Reproduce

  1. Download repro repository: https://github.com/incloudss/elasticapmbug/tree/main
  2. Run both services (visual studio F5 for example)
  3. Call http://localhost:5151/upper

Repository is configured to push telemetry data to jaeger.

The repository by default has Elastic.Apm enabled that breaks traces. If you comment out the line app.UseElasticApm(app.Configuration); for both Program.cs, the traces will be correct.

Expected behavior To not break traces.

incloudss avatar Oct 20 '23 15:10 incloudss