pub struct SentryConfig { /* private fields */ }Expand description
Redaction-safe Sentry client configuration.
Implementations§
Source§impl SentryConfig
impl SentryConfig
Sourcepub fn new(dsn: impl Into<String>) -> Self
pub fn new(dsn: impl Into<String>) -> Self
Creates a secure configuration from an explicit DSN.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Loads the DSN from SENTRY_DSN without exposing it in diagnostics.
Sourcepub fn with_release(self, release: impl Into<String>) -> Self
pub fn with_release(self, release: impl Into<String>) -> Self
Sets the release identifier.
Sourcepub fn with_environment(self, environment: impl Into<String>) -> Self
pub fn with_environment(self, environment: impl Into<String>) -> Self
Sets the deployment environment.
Sourcepub fn with_sample_rates(self, events: f32, traces: f32) -> Result<Self>
pub fn with_sample_rates(self, events: f32, traces: f32) -> Result<Self>
Sets error-event and performance-trace sample rates.
Sourcepub fn with_shutdown_timeout(self, timeout: Duration) -> Result<Self>
pub fn with_shutdown_timeout(self, timeout: Duration) -> Result<Self>
Sets transport shutdown and flushing timeout.
Sourcepub fn with_deduplication(
self,
window: Duration,
capacity: usize,
) -> Result<Self>
pub fn with_deduplication( self, window: Duration, capacity: usize, ) -> Result<Self>
Sets bounded in-process duplicate suppression.
Sourcepub fn allow_insecure_local_dsn(self) -> Result<Self>
pub fn allow_insecure_local_dsn(self) -> Result<Self>
Allows HTTP only for an explicit loopback Sentry DSN.
Sourcepub fn environment(&self) -> Option<&str>
pub fn environment(&self) -> Option<&str>
Returns the configured environment.
Trait Implementations§
Source§impl Clone for SentryConfig
impl Clone for SentryConfig
Source§fn clone(&self) -> SentryConfig
fn clone(&self) -> SentryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SentryConfig
impl RefUnwindSafe for SentryConfig
impl Send for SentryConfig
impl Sync for SentryConfig
impl Unpin for SentryConfig
impl UnsafeUnpin for SentryConfig
impl UnwindSafe for SentryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more