Struct sentry::integrations::contexts::ContextIntegration
source · [−]pub struct ContextIntegration { /* private fields */ }
Expand description
Adds Contexts to Sentry Events.
This integration is enabled by default in sentry
and adds device
, os
and rust
contexts to Events, and also sets a server_name
if it is not
already defined.
See the Contexts Interface documentation for more info.
Examples
let integration = sentry_contexts::ContextIntegration::new().add_os(false);
let _sentry = sentry::init(sentry::ClientOptions::new().add_integration(integration));
Implementations
sourceimpl ContextIntegration
impl ContextIntegration
sourcepub fn new() -> ContextIntegration
pub fn new() -> ContextIntegration
Create a new Context Integration.
sourcepub fn add_os(self, add_os: bool) -> ContextIntegration
pub fn add_os(self, add_os: bool) -> ContextIntegration
Add os
context, enabled by default.
sourcepub fn add_rust(self, add_rust: bool) -> ContextIntegration
pub fn add_rust(self, add_rust: bool) -> ContextIntegration
Add rust
context, enabled by default.
sourcepub fn add_device(self, add_device: bool) -> ContextIntegration
pub fn add_device(self, add_device: bool) -> ContextIntegration
Add device
context, enabled by default.
Trait Implementations
sourceimpl Debug for ContextIntegration
impl Debug for ContextIntegration
sourceimpl Default for ContextIntegration
impl Default for ContextIntegration
sourcefn default() -> ContextIntegration
fn default() -> ContextIntegration
Returns the “default value” for a type. Read more
sourceimpl Integration for ContextIntegration
impl Integration for ContextIntegration
sourcefn setup(&self, options: &mut ClientOptions)
fn setup(&self, options: &mut ClientOptions)
Called whenever the integration is attached to a Client.
sourcefn process_event(
&self,
event: Event<'static>,
_cfg: &ClientOptions
) -> Option<Event<'static>>
fn process_event(
&self,
event: Event<'static>,
_cfg: &ClientOptions
) -> Option<Event<'static>>
The Integrations Event Processor Hook. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContextIntegration
impl Send for ContextIntegration
impl Sync for ContextIntegration
impl Unpin for ContextIntegration
impl UnwindSafe for ContextIntegration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more