-
-
Notifications
You must be signed in to change notification settings - Fork 372
fix: Add null-handling for sentry level parsing #5803
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5803 +/- ##
=============================================
- Coverage 86.595% 86.439% -0.156%
=============================================
Files 423 423
Lines 36360 36349 -11
Branches 17178 15557 -1621
=============================================
- Hits 31486 31420 -66
- Misses 4827 4887 +60
+ Partials 47 42 -5
... and 17 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 162cd7f | 1230.59 ms | 1256.76 ms | 26.16 ms |
| 9add417 | 1224.33 ms | 1243.06 ms | 18.73 ms |
| a2a3bfb | 1227.94 ms | 1261.26 ms | 33.32 ms |
| d38165b | 1211.41 ms | 1242.49 ms | 31.08 ms |
| c63e0fe | 1230.58 ms | 1253.94 ms | 23.35 ms |
| 65ebbdb | 1233.96 ms | 1255.79 ms | 21.83 ms |
| 7c7ac56 | 1225.90 ms | 1250.22 ms | 24.33 ms |
| 6d40fee | 1217.47 ms | 1245.37 ms | 27.90 ms |
| 4e3915a | 1230.02 ms | 1258.90 ms | 28.88 ms |
| 1936411 | 1231.51 ms | 1253.27 ms | 21.76 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 162cd7f | 23.75 KiB | 908.39 KiB | 884.64 KiB |
| 9add417 | 23.75 KiB | 908.40 KiB | 884.65 KiB |
| a2a3bfb | 23.75 KiB | 872.67 KiB | 848.92 KiB |
| d38165b | 23.75 KiB | 855.37 KiB | 831.62 KiB |
| c63e0fe | 23.74 KiB | 874.08 KiB | 850.33 KiB |
| 65ebbdb | 23.75 KiB | 902.33 KiB | 878.59 KiB |
| 7c7ac56 | 23.75 KiB | 902.49 KiB | 878.74 KiB |
| 6d40fee | 23.75 KiB | 912.37 KiB | 888.63 KiB |
| 4e3915a | 23.75 KiB | 858.69 KiB | 834.94 KiB |
| 1936411 | 23.74 KiB | 913.39 KiB | 889.64 KiB |
philipphofmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🚨 Detected changes in high risk code 🚨High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:
|
philipphofmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again LGTM
…)" This reverts commit d3e7aa6.
…)" This reverts commit d3e7aa6.
This PR is derived from #5572 in an effort to make the large amount of changes easier to review for #5577.
The function
sentryLevelForStringis used to map aNSStringto aSentryLeveland expects a non-null input value.This is an important fix, because the implementation uses
SentryLevelHelperwhich is a Swift file, and while the Objective-C code can deal with null values, in Swift it would actually be considered force-unwrapped and crash.sentry-cocoa/Sources/Sentry/SentryLevelMapper.m
Lines 5 to 9 in 1936411
sentry-cocoa/Sources/Swift/Core/Helper/Log/SentryLevel.swift
Lines 38 to 47 in 1936411
This is something we must keep in mind when bridging Objective-C files to Swift (cc @noahsmartin as you are currently most active in this field).
#skip-changelog