pub struct SentryConfig {
pub dsn: Option<String>,
pub environment: Option<String>,
pub sample_rate: Option<f32>,
pub traces_sample_rate: Option<f32>,
}Expand description
Sentry error reporting configuration.
By default Sentry is disabled. Setting dsn (or the DEVBOY_SENTRY_DSN env var)
is sufficient to enable error reporting.
§Example
[sentry]
dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
environment = "production"
sample_rate = 1.0
traces_sample_rate = 0.0Debug is implemented manually so the dsn (which contains an auth token
in its userinfo segment) does not leak through tracing::debug! /
dbg!() / panic backtraces. Serialization preserves the value because
the DSN must round-trip back to the on-disk TOML config.
Fields§
§dsn: Option<String>Sentry DSN endpoint. When empty, Sentry is disabled (no-op).
environment: Option<String>Environment tag (e.g., “production”, “staging”, “development”).
sample_rate: Option<f32>Error sample rate (0.0 - 1.0). Default: 1.0 (send all errors).
traces_sample_rate: Option<f32>Performance tracing sample rate (0.0 - 1.0). Default: 0.0 (disabled).
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 moreSource§impl Debug for SentryConfig
impl Debug for SentryConfig
Source§impl Default for SentryConfig
impl Default for SentryConfig
Source§fn default() -> SentryConfig
fn default() -> SentryConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SentryConfig
impl<'de> Deserialize<'de> for SentryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto 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