#crash-reporting #stack-trace #crash #reporting #sentry #open-telemetry #integration

crashy

crash reporting with nicer stack traces and information about the current process, with optional Sentry integration, with optional Sentry integration, with optional Sentry integration, with optional Sentry integration

5 unstable releases

0.3.2 Nov 11, 2024
0.3.1 Sep 1, 2024
0.3.0 May 3, 2024
0.2.0 Dec 11, 2023
0.1.0 Dec 10, 2023

#532 in Debugging

Download history 165/week @ 2024-08-28 23/week @ 2024-09-04 2/week @ 2024-09-11 3/week @ 2024-09-18 3/week @ 2024-09-25 5/week @ 2024-10-02 4/week @ 2024-10-09 8/week @ 2024-10-16 5/week @ 2024-10-30 115/week @ 2024-11-06 24/week @ 2024-11-13

144 downloads per month
Used in 2 crates

Apache-2.0

55KB
950 lines

crashy

A small crash library that prints that either:

  • prints nicer colored crash traces (that are readible, and contain information like command line arguments), or
  • sends the crash data to sentry (but with minimal dependencies).

It aims to be a small library that covers most (but not all) crash reporting. It reports also the OpenTelemetry TraceId and SpandId if available and the feature trace is enabled.

To set up crashy, in your main function, add:

let _ = crashy::setup_crashy();

To use the Sentry integration, enable feature sentry and define the environment variable SENTRY_DSN during building (using env SENTRY_DSN=https://... cargo build).

To get nicer stack traces, compile to remap paths in the stack trace to more readible versions. Do this with env RUSTFLAGS=--remap-path-prefix=pwd/= cargo build

Features:

  • sentry to enable Sentry upload (SENTRY_DSN environment variable during build is also needed, see above);
  • trace to enable reporting of OpenTelemetry tracing and span ids.

Dependencies

~4–14MB
~170K SLoC