From d96c3f16374393e42dc09a2fd281406516cc7a05 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 20 Apr 2022 17:32:49 +0200 Subject: [PATCH] Add filter order Python now serves as reference implementations. We've recently changed the order there, see https://github.com/getsentry/sentry-python/pull/1394 and https://github.com/getsentry/sentry-python/pull/1390 --- src/docs/sdk/sessions.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/docs/sdk/sessions.mdx b/src/docs/sdk/sessions.mdx index 4d4ef12324..92058a0b3a 100644 --- a/src/docs/sdk/sessions.mdx +++ b/src/docs/sdk/sessions.mdx @@ -509,3 +509,13 @@ Provide an easy way to integrate with existing Node frameworks (Express, Next.js ### Session update filtering Events may be dropped by our filtering mechanisms (sample rate, beforeSend, event processors or ignored exception types). Only events dropped due to sampling should update the session despite being dropped as we assume the event was dropped to save quota but would have been something the developer cares about. Events dropped due to other reasons should not update the session as we assume they are more likely to be dropped because the developer chooses to ignore them. + +#### Filter order + +The python SDK shall serve as a reference here. The order for filtering error events is: +1. Check for ignored exception types (a.k.a `ignore_errors`) +3. Apply scoped `event_processor` (a.k.a `error_processor`) +4. Apply global `event_processor` +2. Apply `before_send` +5. Update the session if an event made it this far +6. Apply sampling rate