Struct sentry_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§
source§impl ContextIntegration
impl ContextIntegration
sourcepub fn add_device(self, add_device: bool) -> Self
pub fn add_device(self, add_device: bool) -> Self
Add device
context, enabled by default.
Trait Implementations§
source§impl Debug for ContextIntegration
impl Debug for ContextIntegration
source§impl Default for ContextIntegration
impl Default for ContextIntegration
source§impl Integration for ContextIntegration
impl Integration for ContextIntegration
source§fn setup(&self, options: &mut ClientOptions)
fn setup(&self, options: &mut ClientOptions)
Called whenever the integration is attached to a Client.
source§fn 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 Freeze for ContextIntegration
impl RefUnwindSafe for ContextIntegration
impl Send for ContextIntegration
impl Sync for ContextIntegration
impl Unpin for ContextIntegration
impl UnwindSafe for ContextIntegration
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