Skip to content

feat(flutter): Report cellular network technology - #4066

Merged
alwx merged 4 commits into
mainfrom
feat/connection-effective-type
Oct 16, 2026
Merged

alwx merged 4 commits into
mainfrom
feat/connection-effective-type

Conversation

@alwx

@alwx alwx commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Events report the generation of the cellular network technology in device.connection_effective_type on Android and iOS, for example 4g or 5g. The native SDKs produce the field, and this SDK passes it on without code changes. This pull request adds a test that makes sure that connection_type and connection_effective_type reach the event from the native contexts.

💡 Motivation and Context

Closes #2435. sentry-cocoa 9.30.0 (getsentry/sentry-cocoa#9097) and sentry-android 8.60.0 (getsentry/sentry-java#6146) add the field.

💚 How did you test it?

A unit test in load_contexts_integration_test.dart.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • No breaking changes

🔮 Next steps

Merge this pull request after the bumps to sentry-cocoa 9.30.0 and sentry-android 8.60.0. The base is v10-branch, because main uses sentry-cocoa 8.

Changelog Entry

  • Report the generation of the cellular network technology in device.connection_effective_type on Android and iOS, for example 4g or 5g. On Android 11 and earlier, the app must have the READ_PHONE_STATE permission.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Features

Flutter

  • Report the generation of the cellular network technology in device.connection_effective_type on Android and iOS, for example 4g or 5g. On Android 11 and earlier, the app must have the READ_PHONE_STATE permission. by alwx in #4066
  • Report the generation of the cellular network technology in device.connection_effective_type on Android and iOS, for example 4g or 5g. On Android 11 and earlier, the app must have the READ_PHONE_STATE permission. by alwx in #4066

Fixes

Flutter

  • Support JNI 1.1 by Carapacik in #4099
  • Allow empty associatedEventId in SentryFeedbackForm by lucas-zimerman in #4108

Other

  • (ios) Avoid deprecated windows in refresh rate by ananyateklu in #4111

Dependencies

Deps

  • chore(deps): update Android SDK to v8.61.1 by github-actions in #4114
  • chore(deps): update Cocoa SDK to v9.31.0 by github-actions in #4112
  • chore(deps): update Native SDK to v0.17.4 by github-actions in #4093

Internal Changes

  • Pin Java 17 for Android updater by buenaflor in #4113

🤖 This preview updates automatically when you update the PR.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (18eaec5) to head (623b3cb).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4066      +/-   ##
==========================================
+ Coverage   88.80%   92.94%   +4.14%     
==========================================
  Files         348      114     -234     
  Lines       12631     4636    -7995     
==========================================
- Hits        11217     4309    -6908     
+ Misses       1414      327    -1087     
Flag Coverage Δ
sentry ?
sentry_dio ?
sentry_drift ?
sentry_file ?
sentry_firebase_remote_config 100.00% <ø> (ø)
sentry_flutter 92.66% <ø> (ø)
sentry_grpc ?
sentry_hive ?
sentry_isar ?
sentry_link ?
sentry_logging ?
sentry_sqflite ?
sentry_supabase 97.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@alwx
alwx marked this pull request as ready for review October 7, 2026 13:56
@alwx
alwx requested review from buenaflor and denrase as code owners October 7, 2026 13:56
Base automatically changed from v10-branch to main October 12, 2026 11:11
@alwx
alwx force-pushed the feat/connection-effective-type branch from e9c2485 to a330a0a Compare October 12, 2026 11:21
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 381.00 ms 400.74 ms 19.74 ms
Size 14.77 MiB 16.08 MiB 1.31 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8a8dc49 362.43 ms 361.82 ms -0.61 ms
1777727 438.67 ms 447.11 ms 8.44 ms
cdf371b 367.64 ms 377.02 ms 9.38 ms
1fff351 423.68 ms 408.96 ms -14.72 ms
1e46846 419.06 ms 429.65 ms 10.59 ms
73dca78 476.53 ms 522.21 ms 45.68 ms
98b29fe 406.81 ms 446.74 ms 39.93 ms
694da33 406.30 ms 403.51 ms -2.79 ms
3f47ea3 368.20 ms 388.14 ms 19.94 ms
d5a1225 377.37 ms 366.56 ms -10.81 ms

App size

Revision Plain With Sentry Diff
8a8dc49 14.77 MiB 16.08 MiB 1.31 MiB
1777727 14.30 MiB 15.49 MiB 1.19 MiB
cdf371b 13.93 MiB 15.18 MiB 1.25 MiB
1fff351 14.31 MiB 15.49 MiB 1.19 MiB
1e46846 14.31 MiB 15.56 MiB 1.25 MiB
73dca78 6.54 MiB 7.69 MiB 1.15 MiB
98b29fe 14.55 MiB 15.87 MiB 1.31 MiB
694da33 14.31 MiB 15.49 MiB 1.19 MiB
3f47ea3 13.93 MiB 15.18 MiB 1.25 MiB
d5a1225 14.31 MiB 15.49 MiB 1.19 MiB

Previous results on branch: feat/connection-effective-type

Startup times

Revision Plain With Sentry Diff
e9c2485 442.21 ms 473.49 ms 31.28 ms
a330a0a 378.59 ms 409.29 ms 30.70 ms

App size

Revision Plain With Sentry Diff
e9c2485 14.77 MiB 16.08 MiB 1.31 MiB
a330a0a 14.77 MiB 16.08 MiB 1.31 MiB

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1248.31 ms 1253.44 ms 5.13 ms
Size 5.91 MiB 6.35 MiB 450.07 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a69a51f 1231.73 ms 1233.15 ms 1.42 ms
e2d675d 1238.48 ms 1242.76 ms 4.28 ms
98188da 1252.31 ms 1251.41 ms -0.90 ms
ebccb5b 1245.39 ms 1249.31 ms 3.92 ms
0265ce5 1261.66 ms 1250.42 ms -11.24 ms
6b69699 1254.80 ms 1273.31 ms 18.52 ms
caa8620 1261.15 ms 1262.62 ms 1.46 ms
d2356d0 1257.04 ms 1257.94 ms 0.89 ms
6287dc4 1262.46 ms 1241.96 ms -20.50 ms
cd94e79 1266.86 ms 1252.40 ms -14.47 ms

App size

Revision Plain With Sentry Diff
a69a51f 5.53 MiB 6.01 MiB 487.38 KiB
e2d675d 7.86 MiB 9.44 MiB 1.58 MiB
98188da 5.83 MiB 6.28 MiB 459.62 KiB
ebccb5b 5.53 MiB 5.96 MiB 444.86 KiB
0265ce5 5.66 MiB 6.09 MiB 448.36 KiB
6b69699 7.86 MiB 9.44 MiB 1.58 MiB
caa8620 5.73 MiB 6.17 MiB 455.47 KiB
d2356d0 5.66 MiB 6.09 MiB 448.38 KiB
6287dc4 5.53 MiB 5.96 MiB 444.81 KiB
cd94e79 5.83 MiB 6.28 MiB 459.39 KiB

Previous results on branch: feat/connection-effective-type

Startup times

Revision Plain With Sentry Diff
a330a0a 1259.28 ms 1271.73 ms 12.45 ms
e9c2485 1243.48 ms 1243.09 ms -0.39 ms

App size

Revision Plain With Sentry Diff
a330a0a 5.91 MiB 6.35 MiB 450.06 KiB
e9c2485 5.91 MiB 6.35 MiB 450.09 KiB

sentry-cocoa 9.30.0 and sentry-android 8.60.0 report the cellular
network technology in device.connection_effective_type. The test makes
sure that the field and connection_type reach the event from native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alwx
alwx force-pushed the feat/connection-effective-type branch from a330a0a to e3a81c5 Compare October 13, 2026 10:07

@buenaflor buenaflor left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what we can also do is maybe add a case in flutter/example/integration_test/integration_test.dart

which will load the actual contexts

https://github.com/getsentry/sentry-dart/blob/main/packages/flutter/example/integration_test/integration_test.dart#L390

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alwx
alwx requested a review from buenaflor October 15, 2026 14:02
@alwx

alwx commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@buenaflor done!

…/sentry-dart into feat/connection-effective-type
@alwx
alwx merged commit b2aecbf into main Oct 16, 2026
71 checks passed
@alwx
alwx deleted the feat/connection-effective-type branch October 16, 2026 07:33
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.

Connection Type to include Cellular Network Technology (e.g. 3G, 4G LTE, 5G)

2 participants