Skip to content
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

Change ordering of event drop mechanisms #1390

Merged
merged 3 commits into from
Apr 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ def _should_capture(
if scope is not None and not scope._should_capture:
return False

if self._is_ignored_error(event, hint):
return False

if (
self.options["sample_rate"] < 1.0
and random.random() >= self.options["sample_rate"]
Expand All @@ -262,9 +265,6 @@ def _should_capture(
self.transport.record_lost_event("sample_rate", data_category="error")
return False

if self._is_ignored_error(event, hint):
return False

return True

def _update_session_from_event(
Expand Down