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

ref(session): Change session update logic to follow the spec #477

Merged
merged 1 commit into from Jun 23, 2022

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Jun 23, 2022

This changes the ordering of filters applied to the event, as well as when a session update happens. This is done in order to follow our unified spec:

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)
  2. Apply scoped event_processor (a.k.a error_processor)
  3. Apply global event_processor
  4. Apply before_send
  5. Update the session if an event made it this far
  6. Apply sampling rate

Closes #461

@kamilogorek kamilogorek requested a review from a team June 23, 2022 14:44
Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

the clarifications are good, and do make sense, though applying all the processors in the case of sampled events is a bit of wasted work, but meh.

@kamilogorek
Copy link
Contributor Author

though applying all the processors in the case of sampled events is a bit of wasted work

Agree, but spec is spec :(

@kamilogorek kamilogorek merged commit 7062d8d into master Jun 23, 2022
@kamilogorek kamilogorek deleted the session-update-logic branch June 23, 2022 16:30
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.

Align SDK with docs regarding session update for dropped events
3 participants