| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Store DeviceInfoUtil on each SentryAndroidOptions instance so repeated SDK initializations cannot reuse stale collection policy or Android services. Preserve lazy initialization while allowing old and new clients to retain their own device context. Refs #5666 Co-Authored-By: Claude <noreply@anthropic.com>
📲 Install BuildsAndroid
|
Sorry, something went wrong.
…n-device-info-options
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Sorry, something went wrong.
Performance metrics 🚀
Baseline results on branch: feat/data-collection-user-infoStartup times
App size
Previous results on branch: fix/data-collection-device-info-optionsStartup times
App size
|
Sorry, something went wrong.
…n-device-info-options
…n-device-info-options
…n-device-info-options
…n-device-info-options
…n-device-info-options
There was a problem hiding this comment.
LGTM 👍
Sorry, something went wrong.
…n-device-info-options
Merge the conflict-resolved cookie policy through the remaining stacked branches. Co-Authored-By: Claude <noreply@anthropic.com>
Merge the latest changes from the preceding Data Collection branch. Co-Authored-By: Claude <noreply@anthropic.com>
Merge the latest changes from the preceding Data Collection branch and retain the current per-options device information lifecycle. Co-Authored-By: Claude <noreply@anthropic.com>
Propagate the corrected OkHttp Set-Cookie fixture through the Data Collection PR stack. Co-Authored-By: Claude <noreply@anthropic.com>
Bring the latest base branch fixes into this stacked branch. Co-Authored-By: Claude <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
PR Stack (Data Collection)
📜 Description
Scope DeviceInfoUtil to each SentryAndroidOptions instance instead of keeping one process-global singleton.
The existing DeviceInfoUtil.getInstance(context, options) entry point remains, but now delegates to a lazily initialized utility owned by the supplied options. Repeated calls with the same options reuse cached device information, while different SDK initializations keep their collection policy, logger, connection provider, root-check setting, and additional-context settings isolated.
Remove the test-only global reset because fresh options now provide test isolation naturally.
💡 Motivation and Context
The user information policy introduced in the preceding stack PR exposed a pre-existing lifecycle problem: Android auto-init followed by manual init could continue reading the first initialization's options from the process-global DeviceInfoUtil. That could attach device.id despite the active initialization setting dataCollection.userInfo=false, and could also retain stale additional-context and root-check behavior.
Owning the cache from SentryAndroidOptions gives every SDK initialization one internally consistent utility without a static map or process-lifetime references to old options.
Refs #5666
💚 How did you test it?
📝 Checklist
🔮 Next steps
Continue the remaining Data Collection configuration and documentation work.
#skip-changelog