Turn SentryOptions into a customer-facing interface
I maintainer di solito rispondono entro 1 giorno
@runningcode ci sta già lavorando.
Dal 28/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
SentryOptions is a ~4,300-line concrete class with ~340 public methods that mixes two concerns:
- Customer configuration: DSN, sample rates,
beforeSend*callbacks,enable*flags, and sub-options (Logs,Metrics,Cron,Proxy, …). - SDK runtime state and internal collaborators: executor service, serializer, envelope reader, transport factory, envelope disk cache, transaction/continuous profilers, modules and debug-meta loaders, thread checker, composite performance collector, connection status provider, replay controller, date provider, monotonic ticker, and so on. ~53 members already carry
@ApiStatus.Internal, which tells us they don't belong on the public type.
Consequences:
- Customers see, and can set, SDK internals. Binary compatibility makes every internal getter/setter effectively public API, so it's hard to change them.
SentryAndroidOptionsand the three Spring BootSentryPropertiesclasses extend the concrete class, so they inherit all of the internal state too. Spring Boot binds properties straight onto that object (see getsentry/sentry-java#6369).- The SDK mutates the same object the customer configured (defaults filled in, collaborators swapped in during
init). It's hard to tell what is configuration and what is state, or when options are "done".
Idea
Make what customers configure an interface that contains only the customer-facing configuration. Move the SDK internals into a separate internal object that init builds from the configured options (holding the executor, serializer, transport, caches, profilers, etc.).
Sentry.init(options -> { ... }) keeps its shape for customers; only the type behind options changes.
Open questions
- Interface, builder, or a concrete class with the internals removed? Which gives the easiest migration and works with Java 8?
- How do Android and Spring Boot options compose: interface inheritance or composition?
- Can options become read-only after
init? What about settings that are meant to change at runtime (e.g., getsentry/sentry-java#5486)? - Which internals do customers legitimately set today (e.g.,
setTransportFactoryin tests,setLogger,setSerializer), and which need a supported public hook? - Migration path: what can we deprecate in 8.x first, and how are the hybrid SDKs (React Native, Flutter, Unity, KMP) that call into
SentryOptions/SentryAndroidOptionsaffected?
- Lingua principale
- Kotlin
- Stelle
- 1.4k
- Fork
- 483
- Merge medio
- 2g 54m
- PR unite (30g)
- 207
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-java
-
Test the `sentry wizard` Android portForse già presa @antonis l’ha presa 1 giorno fa. ApertaPlatform: Java
getsentry/sentry-java#6797 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Narrow and clean up Android consumer keep rulesForse già presa @runningcode l’ha presa 3 giorni fa. ApertaAndroid Platform: Java
getsentry/sentry-java#6771 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Android Bug Platform: Java Waiting for: Product Owner
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
getsentry/sentry-java#6758 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Android Bug Platform: Java Replays
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
getsentry/sentry-java#6741 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Android Bug Platform: Java Replays
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
getsentry/sentry-java#6740 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/sentry-java
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
IacobIonut01/ReFra#1515 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
openwatersio/slackwater-android#162 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
developmentwithyash/yaan#184 ·
I maintainer di solito rispondono entro 1 giorno
-
analytics
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
🐛 Type:Bug 📏 Size: S 🔧 State:In Progress 🔹 Priority: P2 - Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
yeliqin666/xjtu-toolbox-android#623 · 1 commento ·