Skip to main content

ckb_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, as well as sets a `server_name` if not
5//! already defined.
6//!
7//! See the [Contexts Interface] documentation for more info.
8//!
9//! # Examples
10//!
11//! ```
12//! use ckb_sentry_contexts as sentry_contexts;
13//!
14//! let integration = sentry_contexts::ContextIntegration::new().add_os(false);
15//! let _sentry = sentry::init(sentry::ClientOptions::new().add_integration(integration));
16//! ```
17//!
18//! [Contexts Interface]: https://develop.sentry.dev/sdk/event-payloads/contexts/
19
20#![doc(html_favicon_url = "https://sentry-brand.storage.googleapis.com/favicon.ico")]
21#![doc(html_logo_url = "https://sentry-brand.storage.googleapis.com/sentry-glyph-black.png")]
22#![warn(missing_docs)]
23
24mod integration;
25/// Contains functions to retrieve various contexts that can be useful
26/// to attach to events
27pub mod utils;
28
29pub use integration::ContextIntegration;