Repository navigation
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
lbloder
left a comment
There was a problem hiding this comment.
LGTM code-wise.
One question, does this not conflict with the data-collection spec?
…ction-preserve-installation-id # Conflicts: # sentry-android-core/src/main/java/io/sentry/android/core/SentryAndroid.java # sentry-android-core/src/test/java/io/sentry/android/core/AndroidOptionsInitializerTest.kt
🚨 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:
|
Merge the conflict-resolved cookie policy through the remaining stacked branches. 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:
|
Merge the latest changes from the preceding Data Collection branch. 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:
|
Merge the fallback behavior isolation fix from the preceding Data Collection branch. 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:
|
Merge the latest changes from the preceding Data Collection branch. 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:
|
Propagate the corrected OkHttp Set-Cookie fixture through the Data Collection PR stack. 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:
|
Bring the latest base branch fixes into this stacked branch. 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:
|
## DESCRIBE YOUR PR The data collection spec doesn't say whether `userInfo` covers the installation ID that some SDKs generate and send as `user.id`, so SDKs have read it both ways. Java keeps the ID independent of `userInfo` in getsentry/sentry-java#5937, and Cocoa's v10 builds gate it in getsentry/sentry-cocoa#8415. .NET has to pick one in getsentry/sentry-dotnet#5932. This PR adds an "Installation Identifier" section that writes down what Java does: - `dataCollection` options don't gate the installation identifier. It identifies an installation, not a person. - SDKs should generate it at random. They may use an ID the platform provides and scopes to the app, like the console IDs getsentry/sentry-native#2150 allows. They must not use values that identify the device outside the app, like a MAC address or a host name. It also points the `userInfo` row, the "Disable User Identity" example and the technical context examples at the new section. The section adds requirements, so the spec moves to 0.18.0. Why Java's reading: - The spec suggests `userInfo: false` to roughly match `sendDefaultPii: false`, and `sendDefaultPii: false` always sent the installation ID. - Gating only `user.id` doesn't keep the ID on the device, because sessions send the same value as `did`. It would drop the "users affected" counts and protect very little. - Every SDK that has shipped already sends it. Only Cocoa's unreleased v10 builds gate it. I also considered gating it on `userInfo`, the way Cocoa v10 does. That would need a rule for the session `did` too, and it would change behavior in every shipped SDK. For the SDKs, Java already follows this, Cocoa would drop the `SDK_V10` gate before v10 ships, and .NET will follow up on its side. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+
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