1#![expect(missing_docs, reason = "predates lint enforcement")]
2
3fn main() {
4 let _sentry = sentry::init(
5 sentry::ClientOptions::new()
6 .maybe_release(sentry::release_name!())
8 .debug(true)
9 .auto_session_tracking(false),
12 );
13
14 let handle = std::thread::spawn(|| {
15 sentry::start_session();
17 std::thread::sleep(std::time::Duration::from_secs(3));
18 panic!("oh no!");
19 });
20
21 sentry::start_session();
22
23 sentry::capture_message(
24 "anything with a level >= Error will increase the error count",
25 sentry::Level::Error,
26 );
27
28 let err = "NaN".parse::<usize>().unwrap_err();
30 sentry::capture_error(&err);
31
32 std::thread::sleep(std::time::Duration::from_secs(2));
33
34 sentry::end_session();
37
38 handle.join().ok();
39}