opentelemetry-dotnet-instrumentation
opentelemetry-dotnet-instrumentation copied to clipboard
Race condition when setting resource for continuous profiler; Flaky test `ContinuousProfilerTests.ExportAllocationSamples`
When running nuke Workflow on macOS 15 with x64 I get very frequent failures from IntegrationTests.ContinuousProfilerTests.ExportAllocationSamples.
17:31:46 [DBG] [xUnit.net 00:16:38.54] IntegrationTests: --- FAIL: IntegrationTests.RabbitMqTests.SubmitsTraces(6.0.0) (68,17s)
17:31:46 [DBG] [xUnit.net 00:16:38.54] IntegrationTests: === RUN IntegrationTests.RabbitMqTests.SubmitsTraces(7.0.0)
17:31:46 [DBG] Niepowodzenie IntegrationTests.RabbitMqTests.SubmitsTraces(packageVersion: "6.0.0") [1 m 8 s]
17:31:46 [DBG] Komunikat o błędzie:
17:31:46 [DBG]
17:31:46 [DBG] Missing expectations:
17:31:46 [DBG] - "<no description> Instrumentation Scope Name: 'OpenTelemetry.AutoInstrumentation.RabbitMq', predicate is null: 'False'"
10:49:59 [DBG] [xUnit.net 00:21:27.83] IntegrationTests: === RUN IntegrationTests.ContinuousProfilerTests.ExportAllocationSamples()
10:50:13 [DBG] [xUnit.net 00:21:41.21] IntegrationTests: --- FAIL: IntegrationTests.ContinuousProfilerTests.ExportAllocationSamples() (13,33s)
10:50:13 [DBG] Niepowodzenie IntegrationTests.ContinuousProfilerTests.ExportAllocationSamples [13 s]
10:50:13 [DBG] Komunikat o błędzie:
10:50:13 [DBG] Resource attribute "os.build_id" was not found
10:50:13 [DBG] Resource attribute "os.description" was not found
10:50:13 [DBG] Resource attribute "os.name" was not found
10:50:13 [DBG] Resource attribute "os.version" was not found
Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/4000#issuecomment-2631876058
It looks like that there is a race condition that the resource is configured after continuous profiler is initialized.
Still fails frequently.
Seems https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/issues/3896 is making it worse 🤔
I am not able to reproduce this on macOS16 M2. Closing. Please create new issue when it occur.