Description
Problem Statement
When using Sentry SDK 8.0.0+ with frameworks that provide their own OpenTelemetry ContextStorageProvider
implementations (like Quarkus), we experience initialization conflicts:
WARNING: ContextStorageProvider initialized failed. Using default
java.lang.IllegalStateException: Found multiple ContextStorageProvider. Set the io.opentelemetry.context.ContextStorageProvider property to the fully qualified class name of the provider to use.
This occurs because both Sentry and frameworks like Quarkus register their own ContextStorageProvider implementations, but OpenTelemetry can only use one.
Please provide official support for integrating Sentry's OpenTelemetry implementation with external ContextStorageProvider
implementations. Specifically:
- An option to configure Sentry to use an existing ContextStorageProvider instead of registering its own
- Clear documentation on how to properly integrate Sentry with frameworks that have their own OpenTelemetry context implementations
- Hooks or extension points for customizing how Sentry interacts with OpenTelemetry context
Quarkus applications need the Quarkus ContextStorageProvider for proper Vert.x integration and reactive context propagation. Meanwhile, Sentry needs access to the context for proper scope and tracing management.
We would like to use Sentry's rich error reporting capabilities while preserving the framework's context propagation mechanisms.
Solution Brainstorm
To workaround this issue, we're considering:
- Setting the system property to use the Quarkus provider (but unsure if Sentry will function properly)
- Creating a combined provider that wraps both implementations (complex and potentially fragile)
Official support would provide a cleaner, maintainable solution for all Sentry users working with these frameworks.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status