Conversation
Stop treating DataCollection construction as an implicit opt-in. Add an explicit forceDataCollection method so callers can select the new defaults without replacing manifest or external configuration. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Sep 16, 2026
📲 Install BuildsAndroid
|
adinauer
marked this pull request as ready for review
September 16, 2026 13:41
adinauer
requested review from
0xadam-brown,
markushi and
runningcode
as code owners
September 16, 2026 13:41
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.
PR Stack (Data Collection)
📜 Description
Make an empty
DataCollectionneutral and addforceDataCollection()as the explicit way to opt into the documented Data Collection defaults without configuring an individual option.Remove the internal boolean constructor and update SDK-owned configuration objects to use the neutral no-argument constructor. Keep
SentryOptions.setDataCollection(...), but document that replacing the object discards options already configured on that instance.💡 Motivation and Context
Constructing and assigning an empty
DataCollectionpreviously activated the new defaults while replacing values already loaded from external configuration or Android manifest metadata. Callingoptions.getDataCollection().forceDataCollection()now activates those defaults on the existing object, preserving configuration from other sources.Refs #5666
💚 How did you test it?
./gradlew spotlessApply apiDumpDataCollectionTest,DataCollectionResolverTest,SentryOptionsTest, andExternalOptionsTestruns./gradlew :sentry-android-core:testReleaseUnitTest --tests 'io.sentry.android.core.ManifestMetadataReaderTest'./gradlew :sentry:apiCheckgit diff --check📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Complete final review of the Data Collection collection PR.
#skip-changelog