This commit is contained in:
Deirdre Connolly 2020-12-05 14:45:37 -05:00 committed by Deirdre Connolly
parent 8b268e3f71
commit 44e1051dee
4 changed files with 25 additions and 18 deletions

View File

@ -18,7 +18,7 @@ RUN rustc -V; cargo -V; rustup -V
COPY . . COPY . .
RUN cargo test --all --release; cd zebrad/; cargo build --release --features enable-sentry RUN cd zebrad/; cargo build --release --features enable-sentry
# Runner image # Runner image

View File

@ -40,7 +40,7 @@ dirs = "3.0.1"
inferno = { version = "0.10.2", default-features = false } inferno = { version = "0.10.2", default-features = false }
atty = "0.2.14" atty = "0.2.14"
sentry = "0.21.0" sentry = { version = "0.21.0", default-features = false, features = ["backtrace", "contexts", "panic", "reqwest", "rustls"] }
sentry-tracing = { git = "https://github.com/kellpossible/sentry-tracing.git", rev = "f1a4a4a16b5ff1022ae60be779eb3fb928ce9b0f" } sentry-tracing = { git = "https://github.com/kellpossible/sentry-tracing.git", rev = "f1a4a4a16b5ff1022ae60be779eb3fb928ce9b0f" }
[build-dependencies] [build-dependencies]

View File

@ -3,23 +3,32 @@
#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)] #![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
use zebrad::application::APPLICATION; // use zebrad::application::APPLICATION;
/// Boot Zebrad /// Boot Zebrad
fn main() { fn main() {
if cfg!(feature = "enable-sentry") { // if cfg!(feature = "enable-sentry") {
let tracing_integration = sentry_tracing::TracingIntegration::default();
// The Sentry default config pulls in the DSN from the `SENTRY_DSN` // The Sentry default config pulls in the DSN from the `SENTRY_DSN`
// environment variable. // environment variable.
std::mem::forget(sentry::init( let _guard = sentry::init(
sentry::ClientOptions { sentry::ClientOptions {
debug: true, debug: true,
..Default::default() ..Default::default()
} }, // .add_integration(sentry_tracing::TracingIntegration::default()),
.add_integration(tracing_integration), );
)); // }
}
abscissa_core::boot(&APPLICATION); let next = std::panic::take_hook();
std::panic::set_hook(Box::new(move |info| {
println!("Caught panic");
sentry::integrations::panic::panic_handler(info);
next(info);
}));
sentry::capture_message("Hello World!", sentry::Level::Info);
panic!("Everything is on fire!");
//abscissa_core::boot(&APPLICATION);
} }

View File

@ -254,8 +254,6 @@ where
/// multiple peers /// multiple peers
#[instrument(skip(self))] #[instrument(skip(self))]
async fn obtain_tips(&mut self) -> Result<(), Report> { async fn obtain_tips(&mut self) -> Result<(), Report> {
panic!("Everything is on fire!");
let block_locator = self let block_locator = self
.state .state
.ready_and() .ready_and()