apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Elastic.Apm for .net breaks traces
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:
Broken:
To Reproduce
- Download repro repository: https://github.com/incloudss/elasticapmbug/tree/main
- Run both services (visual studio F5 for example)
- 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.