Skip to content

Elastic.Apm for .net breaks traces #2206

Open
@incloudss

Description

@incloudss

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions