Skip to content
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

Add breadcrumbs on network changes #2608

Merged
merged 8 commits into from
Mar 29, 2023
Merged

Conversation

stefanosiano
Copy link
Member

📜 Description

added NetworkBreadcrumbsIntegration
added registerNetworkCallback and unregisterNetworkCallback to ConnectivityChecker
added io.sentry.breadcrumbs.network-events manifest option
added enableNetworkEventBreadcrumbs manual option

💡 Motivation and Context

In order to provide more context to the user when an error occurs or during a transaction, we are adding breadcrumbs on network changes, like when a vpn is enabled or disabled or the device connects/disconnects to/from a network.

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Connection details (vpn status, up/down bandwidth and signal strength) is collected correctly and set as a Hint of the breadcrumbs. I should add these details to the breadcrumb data, too

added registerNetworkCallback and unregisterNetworkCallback to ConnectivityChecker
added io.sentry.breadcrumbs.network-events manifest option
added enableNetworkEventBreadcrumbs manual option
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against cf3ed93

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 310.08 ms 320.83 ms 10.75 ms
Size 1.73 MiB 2.26 MiB 551.18 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
d81684e 235.73 ms 328.76 ms 93.03 ms
17ab223 427.65 ms 484.31 ms 56.65 ms

App size

Revision Plain With Sentry Diff
d81684e 1.73 MiB 2.26 MiB 547.78 KiB
17ab223 1.73 MiB 2.34 MiB 626.85 KiB

Previous results on branch: feat/android-network-breadcrumbs

Startup times

Revision Plain With Sentry Diff
7d71474 289.92 ms 353.24 ms 63.32 ms
66c90cd 330.26 ms 369.08 ms 38.82 ms
39fb59f 344.72 ms 394.45 ms 49.73 ms
d503c14 372.30 ms 445.20 ms 72.90 ms

App size

Revision Plain With Sentry Diff
7d71474 1.73 MiB 2.26 MiB 549.85 KiB
66c90cd 1.73 MiB 2.26 MiB 550.21 KiB
39fb59f 1.73 MiB 2.26 MiB 549.85 KiB
d503c14 1.73 MiB 2.34 MiB 628.09 KiB

@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (349f4e9) 81.37% compared to head (cf3ed93) 81.37%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2608   +/-   ##
=========================================
  Coverage     81.37%   81.37%           
  Complexity     4219     4219           
=========================================
  Files           337      337           
  Lines         15599    15599           
  Branches       2037     2037           
=========================================
  Hits          12693    12693           
  Misses         2111     2111           
  Partials        795      795           
Impacted Files Coverage Δ
sentry/src/main/java/io/sentry/TypeCheckHint.java 0.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stefanosiano stefanosiano marked this pull request as ready for review March 17, 2023 16:58
Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff 👍 a couple of minor things, but lgtm otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants