From 26c877a519bbfe66d4047a0478291043591125b0 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 2 Jan 2020 11:44:04 +0600 Subject: [PATCH] remove sentry as it does not support actix-web 2.0 --- content/docs/sentry.md | 43 ------------------------------------- examples/sentry/Cargo.toml | 9 -------- examples/sentry/src/main.rs | 36 ------------------------------- 3 files changed, 88 deletions(-) delete mode 100644 content/docs/sentry.md delete mode 100644 examples/sentry/Cargo.toml delete mode 100644 examples/sentry/src/main.rs diff --git a/content/docs/sentry.md b/content/docs/sentry.md deleted file mode 100644 index 7e3870b..0000000 --- a/content/docs/sentry.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Sentry -menu: docs_patterns -weight: 1020 ---- - -# Sentry Crash Reporting - -{{% alert %}} -NOTE: Sentry currently does not work with `actix-web` 1.0. Please checkout this -[issue](https://github.com/getsentry/sentry-rust/issues/143) for more details. -{{% /alert %}} - -[Sentry][sentrysite] is a crash reporting system that supports the failure crate which -is the base of the actix error reporting. With a middleware it's possible to -automatically report server errors to Sentry. - -# Middleware - -This middleware captures any error in the server error range (500 - 599) -and sends the attached error to sentry with its stacktrace. - -To use the middleware the [sentry crate][sentrycrate] needs to be initialized and configured -and the [sentry-actix middleware][sentrymiddleware] needs to be added. Additionally it -makes sense to also register the panic handler to be informed about hard panics. - -{{< include-example example="sentry" file="main.rs" section="middleware" >}} - -# Reusing the Hub - -If you use this integration the default sentry hub (`Hub::current()`) is typically the wrong one. -To get the request specific one you need to use the `ActixWebHubExt` trait: - -{{< include-example example="sentry" file="main.rs" section="hub" >}} - -The hub can also be made current for the duration of a call. Then `Hub::current()` works correctly -until the end of the `run` block. - -{{< include-example example="sentry" file="main.rs" section="hub2" >}} - -[sentrysite]: https://sentry.io/ -[sentrycrate]: https://crates.io/crates/sentry -[sentrymiddleware]: https://crates.io/crates/sentry-actix diff --git a/examples/sentry/Cargo.toml b/examples/sentry/Cargo.toml deleted file mode 100644 index 0c3503b..0000000 --- a/examples/sentry/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "sentry" -version = "0.7.0" -edition = "2018" - -[dependencies] -actix-web = "0.7" -sentry-actix = "0.15" -sentry = "0.15" diff --git a/examples/sentry/src/main.rs b/examples/sentry/src/main.rs deleted file mode 100644 index a4de156..0000000 --- a/examples/sentry/src/main.rs +++ /dev/null @@ -1,36 +0,0 @@ -// -// use actix_web::{web, App, HttpResponse}; -// use sentry; -// use sentry_actix::SentryMiddleware; - -// use std::env; - -// fn main() { -// sentry::init("SENTRY_DSN_GOES_HERE"); -// env::set_var("RUST_BACKTRACE", "1"); -// sentry::integrations::panic::register_panic_handler(); - -// let mut app = App::new() -// // .data(state) -// .wrap(SentryMiddleware::new()) -// .route("/", web::get().to(|| HttpResponse::Ok())); -// } -// - -// -// use sentry::{Hub, Level}; -// use sentry_actix::ActixWebHubExt; - -// let hub = Hub::from_request(req); -// hub.capture_message("Something is not well", Level::Warning); -// - -// -// use sentry::{Hub, Level}; -// use sentry_actix::ActixWebHubExt; - -// let hub = Hub::from_request(req); -// Hub::run(hub, || { -// sentry::capture_message("Something is not well", Level::Warning); -// }); -//