Skip to content

test: make dropped spans metrics test deterministic - #2321

Open
RedZapdos123 wants to merge 1 commit into
open-telemetry:mainfrom
RedZapdos123:test/dropped-spans-metrics-deterministic
Open

RedZapdos123 wants to merge 1 commit into
open-telemetry:mainfrom
RedZapdos123:test/dropped-spans-metrics-deterministic

Conversation

@RedZapdos123

@RedZapdos123 RedZapdos123 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The dropped spans metrics test can race with the worker thread and miss the queue overflow path. When that happens, the test only records the export failure metric and the label key assertion becomes nondeterministic.

This changes that example to construct BatchSpanProcessor with start_thread_on_boot: false so the test consistently exercises both dropped span reasons before shutdown flushes the remaining span.

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>

This branch has not been deployed

No deployments
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