Repository navigation
ref(options): Return strings from ignored filter getters - #6489
Merged
Merged
Conversation
getIgnoredErrors, getIgnoredTransactions, getIgnoredCheckIns and getIgnoredSpanOrigins returned List<FilterString> while their setters take List<String>. The asymmetry breaks Kotlin property access and exposes an internal type. The public getters now return the configured strings. The compiled filters used by the SDK move to new internal *Filters() getters. Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>
sentry-junior
Bot
requested review from
romtsn and
runningcode
and removed request for
a team
November 6, 2026 10:25
…d-filter-getters Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io> # Conflicts: # sentry/src/main/java/io/sentry/SentryOptions.java
📲 Install BuildsAndroid
|
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.
📜 Description
SentryOptions.getIgnoredErrors(),getIgnoredTransactions(),getIgnoredCheckIns()andgetIgnoredSpanOrigins()now returnList<String>, matching their setters. The compiledFilterStringlists the SDK matches against move to new@ApiStatus.Internalgetters:getIgnoredErrorFilters(),getIgnoredTransactionFilters(),getIgnoredCheckInFilters()andgetIgnoredSpanOriginFilters(). All SDK call sites use the internal getters, so the hot path still reuses the precompiled patterns.The public getters return a copy of the configured strings. To change the values, use the setter or adder.
💡 Motivation and Context
Raised in #6427 (comment): the getters returned
List<FilterString>and the setters tookList<String>. This made the API asymmetric and broke Kotlin synthetic properties (options.ignoredSpanOrigins = listOf(...)does not compile when the types differ). The other three ignored-* options had the same mismatch, so they are fixed the same way.Renaming the getter alone would not fix Kotlin: Kotlin does not expose set-only properties, so the option would lose property syntax completely.
This is a source-breaking change for code that reads the getters and uses
FilterStringelements. That is acceptable for 9.x.x. The JVM signature (()Ljava/util/List;) is unchanged.💚 How did you test it?
:sentry:testforSentryOptionsTest,SentryClientTest,ScopesTest,SentryTracerTest, including new tests for the getter/setter round trip and the internal filter gettersManifestMetadataReaderTest(Android) was updated but not run locally📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Check whether any hybrid SDK reads these getters and expects
FilterString.via alexander.dinauer.
--
View Session [Sentry]