SIGN IN SIGN UP

feat(core): Add configurable IScopesStorageFactory to SentryOptions (#5199)

* feat(core): Add configurable IScopesStorageFactory to SentryOptions

Allow users to provide a custom IScopesStorage factory via
SentryOptions.setScopesStorageFactory(). When set, the custom factory
takes precedence over the default auto-detection logic.

Fixes #5193

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* changelog

* ref(core): Have ScopesStorageFactory implement IScopesStorageFactory

Add LoadClass and ILogger parameters to IScopesStorageFactory.create()
so custom factories have access to class loading utilities.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Revert "ref(core): Have ScopesStorageFactory implement IScopesStorageFactory"

This reverts commit a0d77eb80af274e5fe6a7412bc3b6547f520c2f3.

* feat(core): Pass SentryOptions to IScopesStorageFactory.create()

SPI-discovered factory implementations are instantiated via ServiceLoader
with no-arg constructors, so they need access to options like logger and
DSN at creation time. Change the interface method signature to accept
SentryOptions as a parameter.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
A
Alexander Dinauer committed
ae6907dfcbc235a4e31e51b47c9d41aa7c2fe878
Parent: 4c09f52
Committed by GitHub <noreply@github.com> on 3/25/2026, 5:44:39 AM