Skip to content

Stabilize distributed trace pipeline tests - #5958

Draft
hoyosjs wants to merge 2 commits into
mainfrom
juhoyosa/ci-flake-investigation
Draft

Stabilize distributed trace pipeline tests#5958
hoyosjs wants to merge 2 commits into
mainfrom
juhoyosa/ci-flake-investigation

Conversation

@hoyosjs

@hoyosjs hoyosjs commented Aug 9, 2026

Copy link
Copy Markdown
Member

Synchronize distributed trace startup at both ends: register the consumer handler before reporting pipeline startup, then wait in the tracee until ActivitySource.HasListeners() confirms the runtime installed the EventPipe listener. Keep the pipeline open until the expected activity is consumed.

This addresses intermittent empty-collection failures in TestTracesPipeline and TestTracesPipelineWithSamplingRatio. No breaking changes.

Manual stress reproduction hit the original failure once in 10 class runs. The current implementation completed 20 stress iterations across the locally runnable .NET 8-10 cases (120 test cases). The .NET 11 cases require CI because the local SDK cannot build the net11 tracee.

hoyosjs added 2 commits August 8, 2026 18:15
Wait for the distributed tracing event handler to be ready before waking the tracee, and wait for activity delivery before stopping the pipeline.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ee7094e3-aa37-4474-b595-d1ed5a1d2764
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ee7094e3-aa37-4474-b595-d1ed5a1d2764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant