errsight 0.1.1

Rust client for ErrSight error tracking — captures panics, errors, and log/tracing events and ships them to the ErrSight API from a background thread.
Documentation
//! Panic capture. `init` installs a panic hook (unless disabled), so an
//! unhandled panic is reported as a `fatal` event with its backtrace before
//! the process unwinds/aborts.
//!
//!     ERRSIGHT_API_KEY=elp_... RUST_BACKTRACE=1 cargo run --example panic_hook

use errsight::Config;

fn main() {
    let _guard = errsight::init(
        Config::builder()
            .environment("development")
            .debug(true)
            .build(),
    );

    println!("about to panic — this will be captured as a fatal event");
    trigger_panic();
}

fn trigger_panic() {
    let empty: Vec<i32> = Vec::new();
    // Index out of bounds → panic. The hook captures it, flushes, then the
    // default hook prints and the process unwinds.
    println!("value: {}", empty[10]);
}