sentry_contexts/
lib.rs

1//! Adds Contexts to Sentry Events.
2//!
3//! This integration is enabled by default in `sentry` and adds `device`, `os`
4//! and `rust` contexts to Events, and also sets a `server_name` if it is not
5//! already defined.
6//!
7//! See the [Contexts Interface] documentation for more info.
8//!
9//! # Examples
10//!
11//! ```rust
12//! let integration = sentry_contexts::ContextIntegration::new().add_os(false);
13//! let _sentry = sentry::init(sentry::ClientOptions::new().add_integration(integration));
14//! ```
15//!
16//! [Contexts Interface]: https://develop.sentry.dev/sdk/event-payloads/contexts/
17
18#![doc(html_favicon_url = "https://sentry-brand.storage.googleapis.com/favicon.ico")]
19#![doc(html_logo_url = "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png")]
20#![warn(missing_docs)]
21
22mod integration;
23/// Contains functions to retrieve various contexts that can be useful
24/// to attach to events
25pub mod utils;
26
27pub use integration::ContextIntegration;