Skip to content

test(core): Add explicit tests for tracesSampler returning negative sampling decisions #17055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 18, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 17, 2025

This PR adds a couple of unit tests to explicitly test sampling behaviour of the core SDK's sampling logic when users pass in a tracesSampler function returning negative sampling values (i.e. 0, false).

According to coverage, this is tested implicitly already but I couldn't find specific explicit tests that assert on this expected outcome. Decided to add some while investigating #16849.

@Lms24 Lms24 requested review from a team, stephanie-anderson, msonnb and s1gr1d and removed request for a team and stephanie-anderson July 17, 2025 10:08
cursor[bot]

This comment was marked as outdated.

@Lms24 Lms24 merged commit 74b680d into develop Jul 18, 2025
328 of 333 checks passed
@Lms24 Lms24 deleted the lms/test-core-tracesSampler branch July 18, 2025 10:28
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.

3 participants