crashtrack 0.1.0

Lightweight Windows crash reporter — uploads minidumps to a crashtrack server
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented1 out of 1 items with examples
  • Size
  • Source code size: 38.31 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 232.85 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AuDowty

crashtrack (Rust client)

Lightweight Windows crash reporter. Installs an unhandled-exception filter that writes a minidump on crash, and uploads queued dumps to a crashtrack server on the next launch.

Add it

[dependencies]
crashtrack = "0.1"

Use it

use crashtrack::Config;

fn main() {
    crashtrack::install(Config {
        api_key:  "ct_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        app:      "myapp",
        version:  env!("CARGO_PKG_VERSION"),
        endpoint: "https://api.crashtrack.dev",
    }).expect("crashtrack install");

    // ... rest of your program
}

Get an API key at https://crashtrack.dev (create a project, copy the key from settings).

What it does

  • On install: sets SetUnhandledExceptionFilter and spawns a background thread that scans %LOCALAPPDATA%/<app>/crashtrack/pending and uploads any queued minidumps from previous crashes.
  • On crash: the filter calls MiniDumpWriteDump and writes the dump to the pending directory, then returns EXCEPTION_CONTINUE_SEARCH so Windows Error Reporting still runs and the process terminates as normal.

The crash is uploaded the next time the app starts. This is intentional — the network stack is unreliable inside an exception filter.

Tradeoffs

  • Self-hosting: the server is open source — point endpoint at your own deployment if you don't want crashes going to crashtrack.dev.
  • Stack overflow: not covered by SetUnhandledExceptionFilter. v0.2 will add a vectored exception handler + guard-page recovery for that case.
  • OOM at crash time: the dump buffer is allocated lazily today. If the crash is from heap exhaustion the dump may fail to write. v0.2 will pre-allocate.

License

MIT