Crate rocket_sentry
source ·Expand description
rocket-sentry is a simple add-on for the Rocket web framework to simplify integration with the Sentry application monitoring system.
Or maybe…
“The Rocket Sentry is a static rocket-firing gun platform that is based on a Personality Construct and used in the Aperture Science Enrichment Center.”
§Example usage
use rocket_sentry::RocketSentry;
#[launch]
fn rocket() -> _ {
rocket::build()
.attach(RocketSentry::fairing())
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add this line
}
Then, the Sentry integration can be enabled by adding a sentry_dsn=
value to
the Rocket.toml
file, for example:
[debug]
sentry_dsn = "" # Disabled
[release]
sentry_dsn = "https://057006d7dfe5fff0fbed461cfca5f757@sentry.io/1111111"
sentry_traces_sample_rate = 0.2 # 20% of requests will be logged under the performance tab