pub struct SentryIntegration { /* private fields */ }Expand description
Initialized Sentry client with owned global restoration and lifecycle state.
Implementations§
Source§impl SentryIntegration
impl SentryIntegration
Sourcepub fn init(config: SentryConfig) -> Result<Self>
pub fn init(config: SentryConfig) -> Result<Self>
Initializes the official Sentry SDK and its panic integration.
Keep the returned value in application lifecycle state so queued events are flushed and the previous hub client is restored on shutdown.
Sourcepub fn hub(&self) -> &Arc<Hub>
pub fn hub(&self) -> &Arc<Hub>
Returns the native base hub used to create isolated request hubs.
Sourcepub fn register(&self, container: &mut Container) -> Result<()>
pub fn register(&self, container: &mut Container) -> Result<()>
Registers this integration as a typed singleton dependency.
Sourcepub fn tower_layer<B>(&self) -> SentryTowerLayer<B>
pub fn tower_layer<B>(&self) -> SentryTowerLayer<B>
Creates the correctly ordered Tower layer for request-hub isolation, redacted request capture, distributed tracing, and matched-route names.
Sourcepub fn tracing_layer<S>(&self) -> SentryLayer<S>where
S: Subscriber + for<'span> LookupSpan<'span>,
pub fn tracing_layer<S>(&self) -> SentryLayer<S>where
S: Subscriber + for<'span> LookupSpan<'span>,
Creates a Sentry tracing_subscriber layer.
Errors become Sentry events, warning/info events become breadcrumbs, and info-or-higher spans participate in performance traces.
Sourcepub fn capture_error<E>(&self, error: &E) -> Uuid
pub fn capture_error<E>(&self, error: &E) -> Uuid
Captures a standard Rust error through this integration’s native hub.
Sourcepub fn capture_message(&self, message: &str, level: Level) -> Uuid
pub fn capture_message(&self, message: &str, level: Level) -> Uuid
Captures a redaction-safe message at a chosen severity.
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Returns whether the client is enabled and has not been shut down.
Trait Implementations§
Source§impl Clone for SentryIntegration
impl Clone for SentryIntegration
Source§fn clone(&self) -> SentryIntegration
fn clone(&self) -> SentryIntegration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more