fix(sessions): storeEnvelope updates session when passed unhandled event#4073
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4073 +/- ##
=============================================
+ Coverage 91.090% 91.126% +0.035%
=============================================
Files 611 610 -1
Lines 47838 47872 +34
=============================================
+ Hits 43576 43624 +48
+ Misses 4262 4248 -14
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 42f4107 | 1224.52 ms | 1244.77 ms | 20.25 ms |
| aeec206 | 1211.31 ms | 1229.18 ms | 17.87 ms |
| caa37b6 | 1221.19 ms | 1238.71 ms | 17.52 ms |
| 160a073 | 1260.72 ms | 1270.10 ms | 9.38 ms |
| b11cd87 | 1243.19 ms | 1260.84 ms | 17.65 ms |
| b064665 | 1230.04 ms | 1254.08 ms | 24.04 ms |
| 90d17d3 | 1261.18 ms | 1278.18 ms | 17.00 ms |
| ea73af6 | 1230.96 ms | 1244.98 ms | 14.02 ms |
| a366f3b | 1230.65 ms | 1251.88 ms | 21.23 ms |
| 1656cf6 | 1229.59 ms | 1245.52 ms | 15.93 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 42f4107 | 21.58 KiB | 614.92 KiB | 593.34 KiB |
| aeec206 | 20.76 KiB | 434.88 KiB | 414.12 KiB |
| caa37b6 | 21.58 KiB | 424.34 KiB | 402.76 KiB |
| 160a073 | 22.85 KiB | 408.88 KiB | 386.03 KiB |
| b11cd87 | 21.58 KiB | 631.85 KiB | 610.27 KiB |
| b064665 | 22.85 KiB | 413.42 KiB | 390.57 KiB |
| 90d17d3 | 20.76 KiB | 432.17 KiB | 411.41 KiB |
| ea73af6 | 20.76 KiB | 425.75 KiB | 404.99 KiB |
| a366f3b | 21.58 KiB | 614.73 KiB | 593.15 KiB |
| 1656cf6 | 21.58 KiB | 546.19 KiB | 524.61 KiB |
Previous results on branch: kw/fix-store-envelope-updates-session
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d2f6b88 | 1218.40 ms | 1231.74 ms | 13.35 ms |
| 90feb2d | 1217.77 ms | 1233.50 ms | 15.73 ms |
| e118e16 | 1216.98 ms | 1226.94 ms | 9.96 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| d2f6b88 | 21.58 KiB | 670.58 KiB | 649.00 KiB |
| 90feb2d | 21.58 KiB | 669.96 KiB | 648.38 KiB |
| e118e16 | 21.58 KiB | 669.72 KiB | 648.14 KiB |
krystofwoldrich
marked this pull request as ready for review
June 17, 2024 13:56
krystofwoldrich
requested review from
armcknight,
brustolin and
philipphofmann
as code owners
June 17, 2024 13:56
…ssion' into kw/fix-store-envelope-updates-session
philipphofmann
left a comment
Member
There was a problem hiding this comment.
Thanks for fixing this in the Cocoa SDK.
brustolin
reviewed
Jun 19, 2024
brustolin
left a comment
Contributor
There was a problem hiding this comment.
It looks good. Just some nitpicks on top of Philipp already commented
…ssion' into kw/fix-store-envelope-updates-session
krystofwoldrich
enabled auto-merge (squash)
June 20, 2024 08:03
krystofwoldrich
disabled auto-merge
June 20, 2024 08:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📜 Description
This PR add session update based on the stored envelope.
Stored envelope with
handled: falseends session as crashed and doe not start a new session. This is important because store envelope will be called by RN only for unhandled errors (not user set but based on RN error handler) these error are re-thrown by the JS engine on the native layers which will cause the application to crash.If the stored envelope from RN is actual crash the application crashes, when the app is opened a new session is started? Is this wanted behaviour? Does it matches native crashes?RN on Android
handled: falseincrements errors count. Whenhandled:falsedoes not crash the app the same session is being updated. This is unwanted and will be updated in getsentry/sentry-java#3480💡 Motivation and Context
handled:falseset in JS sentry-react-native#3614💚 How did you test it?
RN sample app, unit tests
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.