-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
feat: track network connectivity changes with breadcrumbs #3232
feat: track network connectivity changes with breadcrumbs #3232
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #3232 +/- ##
=============================================
+ Coverage 89.128% 89.217% +0.089%
=============================================
Files 502 501 -1
Lines 54251 54022 -229
Branches 19475 19200 -275
=============================================
- Hits 48353 48197 -156
- Misses 4919 4968 +49
+ Partials 979 857 -122 Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
881a955 | 1230.98 ms | 1246.22 ms | 15.24 ms |
3e7aa41 | 1214.02 ms | 1238.84 ms | 24.82 ms |
98752f3 | 1240.61 ms | 1259.80 ms | 19.18 ms |
289c0b8 | 1245.63 ms | 1253.76 ms | 8.13 ms |
b066509 | 1246.14 ms | 1272.42 ms | 26.28 ms |
fdfe96b | 1227.90 ms | 1242.56 ms | 14.66 ms |
dbc67d2 | 1239.49 ms | 1248.88 ms | 9.39 ms |
4259afd | 1222.12 ms | 1249.74 ms | 27.62 ms |
dacf894 | 1223.96 ms | 1250.41 ms | 26.45 ms |
24b4df1 | 1240.98 ms | 1253.98 ms | 13.00 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
881a955 | 22.85 KiB | 407.63 KiB | 384.79 KiB |
3e7aa41 | 20.76 KiB | 432.31 KiB | 411.55 KiB |
98752f3 | 20.76 KiB | 435.09 KiB | 414.33 KiB |
289c0b8 | 22.85 KiB | 407.67 KiB | 384.82 KiB |
b066509 | 22.84 KiB | 403.13 KiB | 380.29 KiB |
fdfe96b | 20.76 KiB | 419.70 KiB | 398.95 KiB |
dbc67d2 | 20.76 KiB | 427.74 KiB | 406.98 KiB |
4259afd | 20.76 KiB | 419.70 KiB | 398.94 KiB |
dacf894 | 20.76 KiB | 426.34 KiB | 405.58 KiB |
24b4df1 | 20.76 KiB | 425.77 KiB | 405.01 KiB |
Previous results on branch: armcknight/feat/3127-network-change-breadcrumbs
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
41c525b | 1218.84 ms | 1226.62 ms | 7.79 ms |
d63a3a5 | 1257.60 ms | 1271.42 ms | 13.82 ms |
5afbde7 | 1261.22 ms | 1264.67 ms | 3.45 ms |
a93728b | 1240.27 ms | 1252.06 ms | 11.79 ms |
dc541cc | 1243.61 ms | 1256.54 ms | 12.93 ms |
6dd4832 | 1234.71 ms | 1256.18 ms | 21.47 ms |
f94c893 | 1244.84 ms | 1261.40 ms | 16.56 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
41c525b | 22.85 KiB | 407.46 KiB | 384.61 KiB |
d63a3a5 | 22.85 KiB | 408.72 KiB | 385.88 KiB |
5afbde7 | 22.84 KiB | 403.75 KiB | 380.90 KiB |
a93728b | 22.85 KiB | 407.75 KiB | 384.90 KiB |
dc541cc | 22.85 KiB | 407.88 KiB | 385.03 KiB |
6dd4832 | 22.85 KiB | 407.92 KiB | 385.07 KiB |
f94c893 | 22.85 KiB | 407.46 KiB | 384.61 KiB |
On Android the breadcrumbs have: We already collect other breadcrumbs under the |
Thanks @stefanosiano for the info! Let me know anything I can do to help update docs, even if you just need a review ✨ |
I just noticed that much of the relevant implementation of SentryReachability are managed by static state, so instantiating another one and calling |
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.
Code wise looks good, but CI is broken
…network-change-breadcrumbs
…network-change-breadcrumbs
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
@brustolin I pushed a new commit that refactors a couple things:
|
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.
All good with the changes.
📜 Description
Monitor reachability of https://sentry.io in SentryBreadcrumbTracker and have its delegate record a breadcrumb every time connectivity changes, recording its description in the breadcrumb data.
Currently calling this breadcrumb type "connectivity", which we'd need to add to https://develop.sentry.dev/sdk/event-payloads/breadcrumbs/#breadcrumb-types. This is subject to change, as is the breadcrumb category of "device.connectivity".
Refactors:
💡 Motivation and Context
For #3127
💚 How did you test it?
New test case in SentryBreadcrumbTrackerTests.swift.