crashy

Crates.iocrashy
lib.rscrashy
version0.3.2
sourcesrc
created_at2023-12-10 22:01:15.669336
updated_at2024-11-11 19:22:42.53696
descriptioncrash 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
homepagehttps://www.bitpowder.com/libs/indigo/
repositoryhttps://gitlab.com/bitpowder/indigo-ng
max_upload_size
id1064553
size41,416
Bernard van Gastel (bvgastel)

documentation

README

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.
Commit count: 1679

cargo fmt