fix(android): [Data Collection 19] Preserve installation ID - #5937
fix(android): [Data Collection 19] Preserve installation ID#5937adinauer wants to merge 6 commits into
Conversation
Keep the Android installation ID available for distinct ID, user ID, device ID, and hybrid scope fallbacks regardless of the userInfo setting. Continue applying userInfo only to automatic user details such as IP addresses and remove the now-unused legacy-always resolver variant. Refs #5666 Co-Authored-By: Claude <noreply@anthropic.com>
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
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. |
📲 Install BuildsAndroid
|
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
…ction-preserve-installation-id
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
…ction-preserve-installation-id
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Performance metrics 🚀
|
…ction-preserve-installation-id
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
…ction-preserve-installation-id
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
PR Stack (Data Collection)
📜 Description
Keep Android's generated installation ID independent of the Data Collection
userInfooption.Restore installation IDs for the default
distinctId, event and exit-infouser.id, device contextdevice.id, and hybrid scope serialization whenuserInfo=false. Application-configured user and distinct IDs remain authoritative. Automatic IP enrichment continues to followuserInfo.Remove the now-unused
isUserInfoWithLegacyAlways()resolver variant and update the Android policy tests.💡 Motivation and Context
The installation ID is a random identifier generated once per app installation and historically remains available independently of
sendDefaultPii. The Data Collection specification definesuserInfoaround automatic user information, but does not require it to control installation identity, device identity, or session correlation.Keeping the installation ID independent preserves existing Android behavior and avoids changing crash-free user, session, log, metric, device-context, and hybrid SDK correlation when applications opt out of automatic user information.
Refs #5666
💚 How did you test it?
./gradlew ':sentry-android-core:testDebugUnitTest' --tests='*AndroidOptionsInitializerTest*' --tests='*ApplicationExitInfoEventProcessorTest*' --tests='*DefaultAndroidEventProcessorTest*' --tests='*DeviceInfoUtilTest*' --tests='*InternalSentrySdkTest*'./gradlew ':sentry:test' --tests='*DataCollectionResolverTest*'./gradlew spotlessApply apiDumpgit diff --check📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Continue the remaining Data Collection configuration and release-gate work.
#skip-changelog