Skip to content

Conversation

@kamilogorek
Copy link
Contributor

Make sample rate work across all processed traffic, not only specific projects IDs.

@kamilogorek kamilogorek requested review from Swatinem and beezz April 5, 2023 09:00
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 5, 2023
return True

return project_id % 1000 < options.get(SYMBOLICATOR_SOURCEMAPS_SAMPLE_RATE_OPTION, 0.0) * 1000
return options.get(SYMBOLICATOR_SOURCEMAPS_SAMPLE_RATE_OPTION) > random.random()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random.random() is [0, 1), so 1.0 will always send 100% of traffic.

@kamilogorek kamilogorek merged commit c1941c3 into master Apr 5, 2023
@kamilogorek kamilogorek deleted the symbolicator-traffic-sample-rate branch April 5, 2023 11:27
schew2381 pushed a commit that referenced this pull request Apr 12, 2023
…46929)

Make sample rate work across all processed traffic, not only specific
projects IDs.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants