Struct sentry::ClientOptions
source · [−]pub struct ClientOptions {Show 20 fields
pub dsn: Option<Dsn>,
pub transport: Box<dyn TransportFactory>,
pub in_app_include: Vec<&'static str>,
pub in_app_exclude: Vec<&'static str>,
pub extra_border_frames: Vec<&'static str>,
pub max_breadcrumbs: usize,
pub trim_backtraces: bool,
pub release: Option<Cow<'static, str>>,
pub environment: Option<Cow<'static, str>>,
pub server_name: Option<Cow<'static, str>>,
pub sample_rate: f32,
pub user_agent: Cow<'static, str>,
pub http_proxy: Option<Cow<'static, str>>,
pub https_proxy: Option<Cow<'static, str>>,
pub shutdown_timeout: Duration,
pub debug: bool,
pub attach_stacktrace: bool,
pub send_default_pii: bool,
pub before_send: Option<Arc<Box<dyn Fn(Event<'static>) -> Option<Event<'static>> + Send + Sync>>>,
pub before_breadcrumb: Option<Arc<Box<dyn Fn(Breadcrumb) -> Option<Breadcrumb> + Send + Sync>>>,
}
Expand description
Configuration settings for the client.
Fields
dsn: Option<Dsn>
The DSN to use. If not set the client is effectively disabled.
transport: Box<dyn TransportFactory>
The transport to use.
This is typically either a boxed function taking the client options by
reference and returning a Transport
, a boxed Arc<Transport>
or
alternatively the DefaultTransportFactory
.
in_app_include: Vec<&'static str>
module prefixes that are always considered in_app
in_app_exclude: Vec<&'static str>
module prefixes that are never in_app
extra_border_frames: Vec<&'static str>
border frames which indicate a border from a backtrace to useless internals. Some are automatically included.
Maximum number of breadcrumbs (0 to disable feature).
trim_backtraces: bool
Automatically trim backtraces of junk before sending.
release: Option<Cow<'static, str>>
The release to be sent with events.
environment: Option<Cow<'static, str>>
The environment to be sent with events.
server_name: Option<Cow<'static, str>>
The server name to be reported.
sample_rate: f32
The sample rate for event submission (0.0 - 1.0, defaults to 1.0)
user_agent: Cow<'static, str>
The user agent that should be reported.
http_proxy: Option<Cow<'static, str>>
An optional HTTP proxy to use.
This will default to the http_proxy
environment variable.
https_proxy: Option<Cow<'static, str>>
An optional HTTPS proxy to use.
This will default to the HTTPS_PROXY
environment variable
or http_proxy
if that one exists.
shutdown_timeout: Duration
The timeout on client drop for draining events on shutdown.
debug: bool
Enables debug mode.
In debug mode debug information is printed to stderr to help you understand what
sentry is doing. When the with_debug_to_log
flag is enabled Sentry will instead
log to the sentry
logger independently of this flag with the Debug
level.
attach_stacktrace: bool
Attaches stacktraces to messages.
send_default_pii: bool
If turned on some default PII informat is attached.
before_send: Option<Arc<Box<dyn Fn(Event<'static>) -> Option<Event<'static>> + Send + Sync>>>
Before send callback.
Before breadcrumb add callback.
Trait Implementations
sourceimpl Clone for ClientOptions
impl Clone for ClientOptions
sourcefn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientOptions
impl Debug for ClientOptions
sourceimpl Default for ClientOptions
impl Default for ClientOptions
sourcefn default() -> ClientOptions
fn default() -> ClientOptions
Returns the “default value” for a type. Read more
sourceimpl<T: IntoDsn> From<(T, ClientOptions)> for ClientOptions
impl<T: IntoDsn> From<(T, ClientOptions)> for ClientOptions
sourcefn from((into_dsn, opts): (T, ClientOptions)) -> ClientOptions
fn from((into_dsn, opts): (T, ClientOptions)) -> ClientOptions
Performs the conversion.
sourceimpl<T: IntoDsn> From<T> for ClientOptions
impl<T: IntoDsn> From<T> for ClientOptions
sourcefn from(into_dsn: T) -> ClientOptions
fn from(into_dsn: T) -> ClientOptions
Performs the conversion.
impl RefUnwindSafe for ClientOptions
Auto Trait Implementations
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl !UnwindSafe for ClientOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more