| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Generate the default Android installation ID after programmatic configuration and only when the resolved user information policy allows it. Preserve custom distinct IDs and keep legacy behavior when Data Collection is absent. Refs #5666 Co-Authored-By: Claude <noreply@anthropic.com>
| "Error in the 'OptionsConfiguration.configure' callback.", | ||
| t); | ||
| } | ||
| if (options.getDistinctId() == null |
There was a problem hiding this comment.
Moving this here no longer allows customers to override it in the options configuration callback passed to init since it used to run before but now is set afterwards. It can still be removed via beforeSend. Is that OK?
Sorry, something went wrong.
There was a problem hiding this comment.
Good question, as this is a change in behaviour for existing users. I.e. if they update and have previously set the id to null in order not to track the id, it would be turned back on after updating the sdk. Also, beforeSend doesn't cover logs or metrics, correct?
Sorry, something went wrong.
There was a problem hiding this comment.
This is a leftover, reverting since we decided not to guard Installation.id()
Sorry, something went wrong.
📲 Install BuildsAndroid
|
Sorry, something went wrong.
Performance metrics 🚀
Baseline results on branch: feat/data-collection-session-replay-network-optionsStartup times
App size
Previous results on branch: fix/data-collection-android-installation-idStartup times
App size
|
Sorry, something went wrong.
…to fix/data-collection-android-installation-id
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.
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
…to fix/data-collection-android-installation-id
This reverts commit b27d61d.\n\nKeep generated installation IDs independent of the userInfo policy. Restore\ndefault generation before programmatic configuration so applications can\ncontinue clearing the distinct ID in the configuration callback.\n\nRefs #5666\n\nCo-Authored-By: Claude <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
PR Stack (Data Collection)
📜 Description
Apply the resolved user information policy when generating Android's default installation-backed distinctId.
Move default distinctId generation out of AndroidOptionsInitializer and run it after the programmatic SentryAndroid.init callback. Generate the installation ID only when no distinct ID is configured and dataCollection.userInfo allows automatic identity collection.
Existing runtime gates in Android event, exit-info, device-context, and hybrid scope enrichment remain unchanged.
💡 Motivation and Context
Android logs and metrics use distinctId as an automatic user.id fallback when no scope user exists. The previous unconditional default generation left that SDK-generated identity available even when applications explicitly configured dataCollection.userInfo=false.
Evaluating the policy after the programmatic callback prevents automatic distinctId generation for opted-out applications while preserving custom IDs and the legacy absent-Data-Collection behavior.
Refs #5666
💚 How did you test it?
📝 Checklist
🔮 Next steps
Add external and Android manifest Data Collection configuration before finalizing the stack.
#skip-changelog