Expand description
sentry-eyre is a integration to capture eyre::Reports. This crate
was inspired by the sentry-anyhow integration, and does a similar API but distinct enough to not create any issues.
§Usage
use eyre::Result;
use sentry::{ClientOptions, init, types::Dsn};
use sentry_eyre::capture_report;
fn method_that_might_fail() -> Result<()> {
Err(eyre::eyre!("this method has failed."))
}
if let Err(e) = method_that_might_fail() {
capture_report(&e);
}Traits§
- Capture
Report Ext - Extension trait to implement a
capture_reportmethod on any implementations.
Functions§
- capture_
report - Captures a
Reportand sends it to Sentry. Refer to the top-level module documentation on how to use this method. - event_
from_ report - Utility function to represent a Sentry
Eventfrom aReport. This shouldn’t be consumed directly unless you want access to the createdEventfrom aReport.