Repository navigation
feat(cli): Write io.sentry.data-collection.user-info in the Android wizard - #2807
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
antonis
reviewed
Dec 2, 2026
antonis
left a comment
Contributor
There was a problem hiding this comment.
The logic matches what we wanted, and FIRST_DATA_COLLECTION_PLUGIN_VERSION = "6.23.0" is right: plugin 6.22.0 installs sentry 8.56.0, and 6.23.0 installs 8.58.0. This PR conflicts with two others, so it should merge after them:
- #2805 changed
addGradlePluginto returnGradlePluginResult(pluginAdded,gradleCheck,gradleOutput). After it merges, addaddedVersionto that type instead of replacing it withsynced, and keep #2805's handling of a failed./gradlew. - #2804 adds
packages/cli/src/lib/wizard/android/version-catalog.ts, which reads the catalog's[plugins]table. Move this PR's[versions]and[libraries]reading (catalogSdks) into that module and share its comment and key parsing, so the repo has one reader forlibs.versions.toml, not two.
Once #2804 and #2805 merge: rebase onto main, make those changes, update the tests, and run pnpm run typecheck && pnpm run lint && pnpm run test.
Contributor
Author
|
Will do. #2804 and #2805 are both still open. Once both merge, I'll rebase onto
Then I'll update the tests, run |
… the SDK reads it The Android wizard writes io.sentry.data-collection.user-info instead of the deprecated io.sentry.send-default-pii when it added the Sentry Android Gradle plugin itself, at 6.23.0 or later, and the app declares no sentry-android, sentry-android-core or sentry-bom older than 8.58.0 or with an unreadable version. Otherwise it keeps writing send-default-pii. GradlePluginResult gains addedVersion for the manifest step, and version-catalog.ts reads [libraries] and [versions] next to [plugins]. A manifest-user-info-key telemetry tag records which key was written. Refs getsentry/sentry-java#6797 Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
sentry-junior
Bot
force-pushed
the
feat/android-wizard-data-collection
branch
from
December 2, 2026 21:38
1ff8fac to
c51aab6
Compare
antonis
approved these changes
Dec 3, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This comes from testing
sentry wizard androidon fresh Android Studio projects, where the wizard writes the deprecatedio.sentry.send-default-piiintoAndroidManifest.xml(getsentry/sentry-java#6797). sentry-java deprecatedsendDefaultPiiin 8.59.0, to be removed in 9.0, in favor ofdataCollection, whoseio.sentry.data-collection.*manifest keys arrived in 8.58.0. With anydata-collectionkey set, the SDK applies the new defaults (user info, cookies with a deny list, HTTP bodies, database query data), soio.sentry.data-collection.user-info=truecollects whatsend-default-pii=truedoes. SDKs before 8.58.0 silently ignore it.When each key is written
io.sentry.data-collection.user-info, only when both hold:io.sentry:sentry-android,sentry-android-coreorsentry-bomolder than 8.58.0, in itsbuild.gradle(.kts)or ingradle/libs.versions.toml. The plugin doesn't install the SDK when one is declared. A versionless SDK counts only next to asentry-bomwith a readable version.io.sentry.send-default-piiotherwise, which works on every 8.x SDK with a deprecation warning: the project already had the plugin (version unknown), a declared SDK is older than 8.58.0, or a declared version can't be read (a variable, a BOM version from a property, a dynamic or rich version, map notation, aversion.refwith no[versions]entry).The comment above the key now says what it collects and links the
dataCollectiondocs. Themanifest-user-info-keytelemetry tag records which key was written.addGradlePlugin'sGradlePluginResultgainsaddedVersion(the plugin version it wrote, orundefined) so the manifest step knows whether the wizard added the plugin. The[libraries]and[versions]reading lives inversion-catalog.tsnext to the[plugins]reader (readCatalogLibraries), sharing its line, comment and key parsing.Open question: catalog entries count whether or not the app module uses them, so an unused old entry falls back to
send-default-pii. Should only entries the app references (libs.<alias>or a bundle) count?via Antonis Lilis.
--
View Session [Sentry]