An experimental Tauri Plugin for Sentry.
Captures and reports to Sentry:
- JavaScript errors and breadcrumbs in Tauri windows using
@sentry/browser
- Panics and breadcrumbs in Rust via the Sentry Rust SDK
- Native crashes as minidumps
Add the plugin as a dependency in Cargo.toml
:
[dependencies]
sentry = "0.27"
sentry-tauri = "0.1"
fn main() {
sentry_tauri::init(
sentry::release_name!(),
|_| {
sentry::init((
"__YOUR_DSN__",
sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
},
))
},
|sentry_plugin| {
tauri::Builder::default()
.plugin(sentry_plugin)
.run(tauri::generate_context!())
.expect("error while running tauri application");
},
);
}
- Injects and initialises
@sentry/browser
in every web-view - Includes a
TauriIntegration
that intercepts events and breadcrumbs and passes them to Rust via the Tauriinvoke
API - Tauri +
serde
+ existing Sentry Rust types = Deserialisation mostly Just Works™️ - Uses
sentry-rust-minidump
which in turn uses theminidumper
andcrash-handler
crates to capture minidumps in pure Rust and sends them as attachments using the Sentry Rust SDK
- There is currently no breadcrumb and scope synchronisation to the crash reporting process so these are missing from minidump events
Clone this repository and install dependencies:
> cd examples/basic-app
> yarn install
In examples/basic-app/src-tauri/src/main.rs
replace __YOUR_DSN__
with your DSN
Run in development mode:
> yarn tauri dev