#[non_exhaustive]pub struct SentryConfig {
pub dsn: String,
pub environment: String,
pub sample_rate: f32,
pub traces_sample_rate: f32,
}Expand description
Sentry error and performance reporting settings.
Embed in Config::sentry and supply a valid DSN to enable Sentry.
tracing:
sentry:
dsn: "https://key@sentry.io/project"
environment: production
sample_rate: 1.0
traces_sample_rate: 0.1Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dsn: StringSentry DSN. When empty, Sentry is not initialised.
environment: StringEnvironment tag reported to Sentry (e.g. "production").
Defaults to the value of APP_ENV (see crate::config::env).
sample_rate: f32Fraction of error events to send (0.0–1.0). Defaults to 1.0.
traces_sample_rate: f32Fraction of transactions to trace for performance monitoring (0.0–1.0).
Defaults to 0.1.
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 · 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§impl<'de> Deserialize<'de> for SentryConfigwhere
SentryConfig: Default,
impl<'de> Deserialize<'de> for SentryConfigwhere
SentryConfig: Default,
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