1fn main() {
2 let _sentry = sentry::init(
3 sentry::ClientOptions::new()
4 .maybe_release(sentry::release_name!())
6 .debug(true)
7 .auto_session_tracking(false),
10 );
11
12 let handle = std::thread::spawn(|| {
13 sentry::start_session();
15 std::thread::sleep(std::time::Duration::from_secs(3));
16 panic!("oh no!");
17 });
18
19 sentry::start_session();
20
21 sentry::capture_message(
22 "anything with a level >= Error will increase the error count",
23 sentry::Level::Error,
24 );
25
26 let err = "NaN".parse::<usize>().unwrap_err();
28 sentry::capture_error(&err);
29
30 std::thread::sleep(std::time::Duration::from_secs(2));
31
32 sentry::end_session();
35
36 handle.join().ok();
37}