debugbundle 1.0.0-alpha.1

Safe, bounded runtime error reporting for Rust, Axum and Actix Web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use debugbundle::{Client, Config, Context, ExceptionSnapshot};
use std::time::Duration;

fn main() {
    let client = Client::new(Config::local(
        "example-command",
        ".debugbundle/local/events",
    ));
    client.capture_exception(
        &ExceptionSnapshot::new("ExampleFailure", "synthetic command failed"),
        &Context::default(),
    );
    let result = client.shutdown(Duration::from_secs(2));
    println!(
        "local accepted={}, drained={}",
        result.accepted_events, result.drained
    );
}