-
-
Notifications
You must be signed in to change notification settings - Fork 372
fix: Use correct parsing for stackframes #6908
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
73c4c82 to
3985141
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6908 +/- ##
=============================================
- Coverage 84.968% 84.895% -0.073%
=============================================
Files 457 459 +2
Lines 27608 27575 -33
Branches 12142 12145 +3
=============================================
- Hits 23458 23410 -48
- Misses 4109 4126 +17
+ Partials 41 39 -2
... and 18 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
3985141 to
ced502e
Compare
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| af848c4 | 1224.02 ms | 1251.00 ms | 26.98 ms |
| 2ec2700 | 1238.28 ms | 1258.82 ms | 20.53 ms |
| b358363 | 1228.33 ms | 1262.34 ms | 34.01 ms |
| dcaec4e | 1209.06 ms | 1246.02 ms | 36.96 ms |
| 5ff1b04 | 1226.00 ms | 1259.98 ms | 33.98 ms |
| 1b9991e | 1233.45 ms | 1256.61 ms | 23.17 ms |
| f8cad3c | 1217.94 ms | 1257.96 ms | 40.02 ms |
| 5cfc768 | 1220.74 ms | 1245.06 ms | 24.32 ms |
| 650d802 | 1231.86 ms | 1255.64 ms | 23.78 ms |
| 5ec90e0 | 1235.57 ms | 1258.45 ms | 22.88 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| af848c4 | 24.14 KiB | 1.01 MiB | 1012.94 KiB |
| 2ec2700 | 23.75 KiB | 980.80 KiB | 957.05 KiB |
| b358363 | 23.75 KiB | 987.92 KiB | 964.18 KiB |
| dcaec4e | 24.15 KiB | 1.01 MiB | 1014.80 KiB |
| 5ff1b04 | 23.75 KiB | 1.01 MiB | 1016.24 KiB |
| 1b9991e | 23.75 KiB | 908.01 KiB | 884.26 KiB |
| f8cad3c | 23.75 KiB | 1.01 MiB | 1016.13 KiB |
| 5cfc768 | 23.75 KiB | 850.73 KiB | 826.98 KiB |
| 650d802 | 23.74 KiB | 913.13 KiB | 889.39 KiB |
| 5ec90e0 | 23.74 KiB | 872.67 KiB | 848.92 KiB |
Previous results on branch: mxRewriting
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c20c3c1 | 1209.08 ms | 1237.69 ms | 28.61 ms |
| d0cf095 | 1225.92 ms | 1255.11 ms | 29.20 ms |
| 44da6c5 | 1234.22 ms | 1266.02 ms | 31.80 ms |
| bf3e245 | 1222.17 ms | 1257.09 ms | 34.92 ms |
| 793ffea | 1229.79 ms | 1264.65 ms | 34.86 ms |
| c5b3f7a | 1220.18 ms | 1259.44 ms | 39.25 ms |
| f3b889c | 1221.57 ms | 1252.77 ms | 31.20 ms |
| 8824c94 | 1226.98 ms | 1262.65 ms | 35.67 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| c20c3c1 | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| d0cf095 | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| 44da6c5 | 24.14 KiB | 1.03 MiB | 1.00 MiB |
| bf3e245 | 24.14 KiB | 1.03 MiB | 1.00 MiB |
| 793ffea | 24.14 KiB | 1.03 MiB | 1.00 MiB |
| c5b3f7a | 24.14 KiB | 1.01 MiB | 1013.45 KiB |
| f3b889c | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| 8824c94 | 24.14 KiB | 1.01 MiB | 1014.88 KiB |
d978079 to
169cf94
Compare
a7949ab to
0c4f788
Compare
0c4f788 to
db09d78
Compare
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.
Thank you @noahsmartin, I added a few comments.
Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift
Outdated
Show resolved
Hide resolved
db09d78 to
ec54ac6
Compare
Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift
Outdated
Show resolved
Hide resolved
62cf281 to
47f8d7c
Compare
47f8d7c to
bd44249
Compare
|
Thanks @philipphofmann this is ready for another look! |
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.
Thanks, LGTM.
Sources/Swift/Core/MetricKit/SentryMXCallStackTree+Parsing.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Core/MetricKit/SentryMXCallStackTree+Parsing.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Core/MetricKit/SentryMXCallStackTree+Parsing.swift
Outdated
Show resolved
Hide resolved
Sources/Swift/Core/MetricKit/SentryMXCallStackTree+Parsing.swift
Outdated
Show resolved
Hide resolved
a787ad7 to
6f5758b
Compare
6f5758b to
ac40ad2
Compare
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
Fixes #4040
The problem was that for some events such as app hangs and CPUDiagnostics the metric kit payload contains an entire flamegraph. This change parses the flame graph into samples, and then picks the longest duration sample as the one we use for a stack trace. It also fixes over-counting the CPUDiagnostics which was emitting more than one event per exception. This is also fixed by identifying the longest duration sample.
Eventually we should support showing the full flame graph on the frontend, but with this PR the bug is fixed and we can consider that a future improvement.
I tested this on test flight by triggering crashes and verifying they are still correct, as well as manually replaying hang reports received in production