PricingBlogDocumentationDocsRegister

Connect your Rust project to GlitchTip

To add GlitchTip to your Rust project you need to add a new dependency to your Cargo.toml:

[dependencies]
sentry = 'current version number'

sentry.init() will return you a guard that when freed, will prevent process exit until all events have been sent (within a timeout):

let _guard = sentry::init("your DSN here");

The quickest way to verify Sentry in your Rust application is to cause a panic:

fn main() {
    // Initialize sentry here
    sentry::integrations::panic::register_panic_handler();

    // GlitchTip will capture this
    panic!("Everything is on fire!");
}