Function sentry_contrib_native::shutdown[][src]

pub fn shutdown()

Shuts down the Sentry client and forces transports to flush out.

Examples

fn main() -> Result<()> {
    sentry_init()?;

    // ...
    // your application code
    // ...

    // call shutdown manually to make sure transports flush out
    shutdown();
    Ok(())
}

fn sentry_init() -> Result<()> {
    let options = Options::new();
    // `forget` to not automatically shutdown Sentry
    options.init()?.forget();
    Ok(())
}