feat(session): Add unhandled
session status type
#4939
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is in service of this project: https://www.notion.so/sentry/RFC-Session-Status-unhandled-2308b10e4b5d801d9805fece61533ac5#2308b10e4b5d80e9b312ecbea27a4af3
TL/DR:
We're adding a new enum value to split up the existing
crashed
release health metric into two more specific metrics:For cases like Flutter: a Dart error will not crash the running process, while a native error will. We want to be clearer about this when we report errors to sentry users.
This PR
This PR will allow us to properly count
session
andsessions
envelopes that contain the new value. When asession
envelope arrives that has the new value:status: unhandled
we want theSessionLike
metric to handle that the same way we handlestatus: abnormal
orstatus: crashed
. We'll subtract 1 from theerrors
count and return1
fromunhandled_count()
.Similarly, for
sessions
envelopes we need to implement theunhandled_count()
function.Finally, we have to implement the if-statements that will get the new count from the session,
session.unhandled_count()
and push the value into the list.Fixes REPLAY-549