Skip to content

Conversation

@romtsn
Copy link
Member

@romtsn romtsn commented Dec 16, 2025

📜 Description

  • Make external storage size collection an opt-in (note added to the changelog)
  • For internal storage use Environment.getDataDirectory() which gives path to /data and still allows querying global stats for the internal storage + does not call the blocking context.getFilesDir API

💡 Motivation and Context

Closes #4963

💚 How did you test it?

Manually, see this event with the storage size data: https://sentry-sdks.sentry.io/issues/7033512048/events/9ee5087ef915441caf9bdd38bacaa245/

📝 Checklist

  • I added GH Issue ID & Linear ID
  • 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.
  • I updated the wizard 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

* Enables or disables collecting of device information which requires Inter-Process Communication
* (IPC)
*/
private boolean collectAdditionalContext = true;

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 334.26 ms 419.52 ms 85.26 ms
Size 1.58 MiB 2.13 MiB 559.54 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5b66efd 308.67 ms 363.85 ms 55.18 ms
fc5ccaf 322.49 ms 405.25 ms 82.76 ms
6405ec5 310.88 ms 354.56 ms 43.69 ms
d364ace 382.77 ms 443.21 ms 60.44 ms
bbc35bb 298.53 ms 372.17 ms 73.64 ms
3d205d0 352.15 ms 432.53 ms 80.38 ms
539ca63 313.51 ms 355.43 ms 41.92 ms
dba088c 365.46 ms 366.31 ms 0.85 ms
fc5ccaf 270.49 ms 363.90 ms 93.41 ms
fcec2f2 328.91 ms 387.75 ms 58.84 ms

App size

Revision Plain With Sentry Diff
5b66efd 1.58 MiB 2.13 MiB 559.07 KiB
fc5ccaf 1.58 MiB 2.13 MiB 557.54 KiB
6405ec5 1.58 MiB 2.12 MiB 552.23 KiB
d364ace 1.58 MiB 2.11 MiB 539.75 KiB
bbc35bb 1.58 MiB 2.12 MiB 553.01 KiB
3d205d0 1.58 MiB 2.10 MiB 532.97 KiB
539ca63 1.58 MiB 2.12 MiB 551.41 KiB
dba088c 1.58 MiB 2.13 MiB 558.99 KiB
fc5ccaf 1.58 MiB 2.13 MiB 557.54 KiB
fcec2f2 1.58 MiB 2.12 MiB 551.50 KiB

Previous results on branch: rz/fix/external-files-dir-optin

Startup times

Revision Plain With Sentry Diff
d9f1134 302.17 ms 356.53 ms 54.36 ms

App size

Revision Plain With Sentry Diff
d9f1134 1.58 MiB 2.13 MiB 559.54 KiB

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

LGTM, but I think one test needs fixing.

@romtsn romtsn merged commit 9139b91 into main Dec 17, 2025
60 of 61 checks passed
@romtsn romtsn deleted the rz/fix/external-files-dir-optin branch December 17, 2025 10:52
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.

ANR: io.sentry.android.core.DeviceInfoUtil.lambda$setDeviceIO$0

3 participants