Skip to content

test(relay): isolate telemetry callsite registry assertions (#7404) - #7436

Open
bounce12340 wants to merge 1 commit into
block:mainfrom
bounce12340:fix/7404-telemetry-test-isolation
Open

test(relay): isolate telemetry callsite registry assertions (#7404)#7436
bounce12340 wants to merge 1 commit into
block:mainfrom
bounce12340:fix/7404-telemetry-test-isolation

Conversation

@bounce12340

Copy link
Copy Markdown

Summary

  • Add a process-wide CALLSITE_LOCK around telemetry tests that install subscribers / assert callsite Interest.
  • tracing's callsite registry is process-global and sticky; thread-local with_default alone races under parallel cargo test.
  • Covers trace_context_json_correlates_nested_span_logs and trace_context_lookup_does_not_enable_callsites.

Closes #7404

Test plan

  • cargo test -p buzz-relay --lib telemetry -- --test-threads=8 (or full relay suite) repeatedly without the flake
  • Isolated run of trace_context_lookup_does_not_enable_callsites still passes

Serialize subscriber-installing telemetry tests with a module-level
Mutex so parallel cargo test cannot race tracing's process-global
callsite Interest registry against thread-local with_default scopes.

Fixes block#7404

Signed-off-by: Josh Tsai <bounce12340@users.noreply.github.com>
@bounce12340
bounce12340 requested a review from a team as a code owner September 7, 2026 01:56
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 3c7f288c60d67df78577b237e27c3dfc8831aaa1...c0f744c6a786883f33662f36686f69eac8ead71f.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review c0f744c6a786883f33662f36686f69eac8ead71f to authorize a new review.
Any previous review applies only to its recorded range.

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.

Flaky: trace_context_lookup_does_not_enable_callsites fails under parallel test execution (global callsite registry)

1 participant