Skip to main content

init

Function init 

Source
pub fn init(configure: impl FnOnce(&mut Configuration))
Expand description

Configures the client. Call once at startup, before your server starts accepting requests. Pass a closure to set any Configuration field:

forge_ops_tracker::init(|c| {
    c.dsn = Some("https://<api_key>@your-forgeops-host/api/v1/events".to_string());
    c.release = Some("a1b2c3d".to_string());
});

Installs the global panic hook (see install_panic_hook) unless Configuration.install_panic_hook is set to false inside the closure.