Turn SentryOptions into a customer-facing interface
Mantenedores costumam responder em até 1 dia
@runningcode já está trabalhando nisso.
Desde 28/10/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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?
- Linguagem predominante
- Kotlin
- Estrelas
- 1.4k
- Forks
- 483
- Merge médio
- 2d 54min
- PRs com merge (30d)
- 207
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-java
-
Test the `sentry wizard` Android portTalvez já em andamento @antonis assumiu há 1 dia. AbertaPlatform: Java
getsentry/sentry-java#6797 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Narrow and clean up Android consumer keep rulesTalvez já em andamento @runningcode assumiu há 3 dias. AbertaAndroid Platform: Java
getsentry/sentry-java#6771 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Waiting for: Product Owner
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
getsentry/sentry-java#6758 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Replays
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
getsentry/sentry-java#6741 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Replays
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 50/100
getsentry/sentry-java#6740 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de getsentry/sentry-java
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
IacobIonut01/ReFra#1515 · 1 comentário ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
openwatersio/slackwater-android#162 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 Meio dia Facilidade para iniciantes 72/100
developmentwithyash/yaan#184 ·
Mantenedores costumam responder em até 1 dia
-
analytics
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
🐛 Type:Bug 📏 Size: S 🔧 State:In Progress 🔹 Priority: P2 - Medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
yeliqin666/xjtu-toolbox-android#623 · 1 comentário ·