Expand description
A Rust library to simplify and streamline incident reporting to various 3rd party services
§Features
- Support for multiple configurable backends
- Middleware support, allowing applications to customize emitted alerts before they are being sent
- Supports shortcuts for handling
Result
s with propagation to alerts - Catches and reports panics (only when configured globally
§Getting Started
You configure airbag by using the or functions to register either a global or a thread-local Airbag handler respectively.
These functions both receive a Backend implementor that will be used to actually emit the generated alerts.
let _guard = airbag::configure(
airbag::backends::SquadCast::builder()
.region("eu")
.token("your SquadCast API token here")
.build());
Note: when in thread-local mode, Airbag does not catch panics, as panic handlers are always a shared resource in Rust
Re-exports§
pub use alert::Alert;
pub use result::AirbagResult;
Modules§
- Airbag supports installing Middleware implementors on backends to allow processing alerts before they are being sent.
- When working with
Result
s in Rust, one sometimes wants to propagate erroneous results as alerts, but otherwise ignore the erroneous cases.