Skip to content

ref(options): Return strings from ignored filter getters - #6489

Merged
adinauer merged 3 commits into
9.x.xfrom
ref/symmetric-ignored-filter-getters
Nov 6, 2026
Merged

adinauer merged 3 commits into
9.x.xfrom
ref/symmetric-ignored-filter-getters

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

SentryOptions.getIgnoredErrors(), getIgnoredTransactions(), getIgnoredCheckIns() and getIgnoredSpanOrigins() now return List<String>, matching their setters. The compiled FilterString lists the SDK matches against move to new @ApiStatus.Internal getters: getIgnoredErrorFilters(), getIgnoredTransactionFilters(), getIgnoredCheckInFilters() and getIgnoredSpanOriginFilters(). 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 took List<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 FilterString elements. That is acceptable for 9.x.x. The JVM signature (()Ljava/util/List;) is unchanged.

💚 How did you test it?

  • :sentry:test for SentryOptionsTest, SentryClientTest, ScopesTest, SentryTracerTest, including new tests for the getter/setter round trip and the internal filter getters
  • Compiled all touched JVM integration modules and the Spring Boot test sources
  • ManifestMetadataReaderTest (Android) was updated but not run locally

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Check whether any hybrid SDK reads these getters and expects FilterString.

via alexander.dinauer.

--

View Session [Sentry]

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
sentry-junior Bot requested review from a team and adinauer as code owners November 6, 2026 10:25
@sentry-junior
sentry-junior Bot requested review from romtsn and runningcode and removed request for a team November 6, 2026 10:25
sentry-junior Bot and others added 2 commits November 6, 2026 10:25
Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>
…d-filter-getters

Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>

# Conflicts:
#	sentry/src/main/java/io/sentry/SentryOptions.java
@sentry

sentry Bot commented Nov 6, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@adinauer
adinauer merged commit 8446110 into 9.x.x Nov 6, 2026
39 of 40 checks passed
@adinauer
adinauer deleted the ref/symmetric-ignored-filter-getters branch November 6, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants