-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Observe network state to upload any unsent envelopes #2910
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ebdd7ec | 360.63 ms | 396.29 ms | 35.65 ms |
832584f | 314.72 ms | 362.38 ms | 47.66 ms |
25a760c | 310.30 ms | 351.38 ms | 41.08 ms |
658a82c | 309.27 ms | 365.35 ms | 56.08 ms |
8b1b6fc | 316.96 ms | 365.45 ms | 48.49 ms |
70f6e88 | 335.72 ms | 372.84 ms | 37.12 ms |
4881e6a | 296.22 ms | 334.90 ms | 38.68 ms |
8a1f1f3 | 404.78 ms | 486.32 ms | 81.54 ms |
2cd49ea | 315.61 ms | 361.77 ms | 46.16 ms |
8ba4611 | 320.46 ms | 361.84 ms | 41.38 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ebdd7ec | 1.72 MiB | 2.26 MiB | 548.22 KiB |
832584f | 1.72 MiB | 2.26 MiB | 549.33 KiB |
25a760c | 1.72 MiB | 2.26 MiB | 549.33 KiB |
658a82c | 1.72 MiB | 2.26 MiB | 548.34 KiB |
8b1b6fc | 1.72 MiB | 2.26 MiB | 548.34 KiB |
70f6e88 | 1.72 MiB | 2.26 MiB | 549.33 KiB |
4881e6a | 1.72 MiB | 2.26 MiB | 548.34 KiB |
8a1f1f3 | 1.72 MiB | 2.26 MiB | 550.12 KiB |
2cd49ea | 1.72 MiB | 2.26 MiB | 548.94 KiB |
8ba4611 | 1.72 MiB | 2.26 MiB | 548.94 KiB |
Note that on Android we use SendCachedEnvelopeIntegration, so the change has likely to be implemented for both The former one is android-only as we also check for startup crashes there and block in case there are any. The latter one is jvm/backend only, and has to be manually installed by our users. We could also try to combine those two into one, but I remember I didn't want to do that, because on pure jvm apps we don't really need it, see #2277 (comment) |
…va into feat/observe-network
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.
A few minor things:
- Left some comments what I think make sense to change a bit
- A few tests missing for the
sentry
module - A few
final
keywords missing
Otherwise looks great, I think this is a crucial improvement 🚀
...core/src/main/java/io/sentry/android/core/internal/util/AndroidConnectionStatusProvider.java
Show resolved
Hide resolved
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.
Gave this a quick look, LGTM.
sentry-android-core/src/main/java/io/sentry/android/core/SendCachedEnvelopeIntegration.java
Outdated
Show resolved
Hide resolved
...core/src/main/java/io/sentry/android/core/internal/util/AndroidConnectionStatusProvider.java
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/SendCachedEnvelopeFireAndForgetIntegration.java
Outdated
Show resolved
Hide resolved
sentry/src/test/java/io/sentry/transport/AsyncHttpTransportTest.kt
Outdated
Show resolved
Hide resolved
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.
looks great, just fix the comments left and we're good to go!
Co-authored-by: Roman Zavarnitsyn <[email protected]> Co-authored-by: Sentry Github Bot <[email protected]>
Codecov ReportAttention:
... and 105 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
@romtsn I noticed these code changes aren't in https://github.com/getsentry/sentry-java/releases/tag/7.0.0-rc.1. Are these changes slated for a future 7.x release? |
@dave-t-tran they've been part of https://github.com/getsentry/sentry-java/releases/tag/7.0.0-beta.1 already, so the rc.1 also contains them |
📜 Description
Adds a
ConnectionStatusProvider
mechanic, so we can observe changes to the connection state.API wise this is already complete, only some more tests for
SendCachedEnvelopeFireAndForgetIntegration
are required.💡 Motivation and Context
Partially implements #912
💚 How did you test it?
Added unit tests.
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps