Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/auguwu/sentry-eyre
🐻❄️👀 Sentry integration for `eyre`
https://github.com/auguwu/sentry-eyre
eyre eyre-rust rust sentry sentry-rust
Last synced: 2 months ago
JSON representation
🐻❄️👀 Sentry integration for `eyre`
- Host: GitHub
- URL: https://github.com/auguwu/sentry-eyre
- Owner: auguwu
- License: mit
- Created: 2023-08-16T07:03:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-23T20:19:52.000Z (3 months ago)
- Last Synced: 2024-10-26T04:50:10.933Z (3 months ago)
- Topics: eyre, eyre-rust, rust, sentry, sentry-rust
- Language: Rust
- Homepage: https://docs.rs/sentry-eyre
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 🐻❄️👀 sentry-eyre
> *Sentry integration for [`eyre`](https://crates.io/crates/eyre)***sentry-eyre** is a integration to capture [`eyre::Report`](https://docs.rs/eyre/latest/eyre/struct.Report.html)s. This crate was inspired by the `sentry-anyhow` integration, and does a similar API but distinct enough to not create any issues.
## Usage
```toml
[dependencies]
sentry-eyre = "0.2"
sentry = "*"
``````rs
use eyre::Result;
use sentry_eyre::capture_report;
use sentry::{ClientOptions, init, types::Dsn};
use std::io::{Error, ErrorKind};fn some_method_that_fails() -> Result<()> {
Err(Error::new(ErrorKind::Other, "this should fail"))
}fn main() {
// init the client guard, which will be dropped at the end
// of the scope.
let _guard = init(ClientOptions::default());
let func = some_method_that_fails();match func {
Ok(()) => panic!("expected this to fail")
Err(report) => {
capture_report(&report);
}
}
}
```## License
**sentry-eyre** is released under the [MIT License](https://github.com/auguwu/sentry-eyre/blob/master/LICENSE) with love by **Noel Towa**