sentry_contrib_breakpad/
lib.rs

1//! Capture and report minidumps to [Sentry](https://sentry.io/about/)
2//!
3//! 1. Create a [`BreakpadTransportFactory`] for [`ClientOptions::transport`](https://docs.rs/sentry-core/0.23.0/sentry_core/struct.ClientOptions.html#structfield.transport)
4//! , providing it with the [`TransportFactory`](https://docs.rs/sentry-core/0.23.0/sentry_core/trait.TransportFactory.html)
5//! you were previously using.
6//! 2. Initialize a Sentry [`Hub`](https://docs.rs/sentry-core/0.23.0/sentry_core/struct.Hub.html).
7//! 3. Create the [`BreakpadIntegration`] which will attach a crash handler and
8//! send any previous crashes that are in the crash directoy specified.
9
10macro_rules! debug_print {
11    ($($arg:tt)*) => {
12        #[cfg(feature = "debug-logs")]
13        {
14            eprintln!("[bp] {}", format_args!($($arg)*));
15        }
16        #[cfg(not(feature = "debug-logs"))]
17        {
18            let _ = format_args!($($arg)*);
19        }
20    }
21}
22
23mod breakpad_integration;
24mod error;
25mod shared;
26mod transport;
27
28pub use breakpad_integration::{BreakpadIntegration, InstallOptions};
29pub use error::Error;
30pub use transport::{BreakpadTransportFactory, CrashSendStyle};