Crates.io | sentry-process |
lib.rs | sentry-process |
version | 2.1.0 |
source | src |
created_at | 2019-02-01 14:23:54.625348 |
updated_at | 2022-06-08 08:20:14.772784 |
description | Report failed processes/scripts to Sentry |
homepage | |
repository | https://gitlab.com/dsferruzza/sentry-process |
max_upload_size | |
id | 111994 |
size | 45,801 |
Report failed processes/scripts to Sentry.
⚠️ Main repository is here: https://gitlab.com/dsferruzza/sentry-process ⚠️
Sentry is a cool system that helps developers to aggregate, monitor and fix errors/exceptions in their own apps. It has integrations for many technologies so that reported errors can contain relevant informations.
But sometimes it can be desirable to plug Sentry to an arbitrary process. Such process can be a binary that was built without Sentry support, or a Bash script that runs every night on a server, for example.
With Sentry Process it is now easy to launch a process that will send an event to a Sentry instance whenever it fails!
SENTRY_DSN
environment variable (use the URL given in Your project > Settings > Client Keys (DSN)
in Sentry)sentry-process COMMAND [ARGUMENTS]...
(wrap your process call like you would do with sudo
)If running COMMAND [ARGUMENTS]...
results in an exit code that is not 0
, Sentry Process considers it as a failure and reports. For example, sentry-process false
will report whereas sentry-process true
will not.
The exit code, standard output and standard error of COMMAND [ARGUMENTS]...
are re-emmited by sentry-process COMMAND [ARGUMENTS]...
, so that it can be piped or used by other programs. In fact, standard output and standard error are streamed so you can run (for example) sentry-process wget https://somebigfileurl
and see the progress just like if you had run wget https://somebigfileurl
.
Sentry Process needs Rust 1.54+ to be compiled.
stdout
) and standard error (stderr
) of the process you want to run (if it fails). Your Sentry instance might reject the report if this data is more than 200 kB (see Sentry's documentation), so Sentry Process uses a circular buffer to ensure that this limit cannot be reached and the most recent outputs are sent with the report.MIT License Copyright (c) 2019 David Sferruzza