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 . .
RUN cargo test --all --release; cd zebrad/; cargo build --release --features enable-sentry
RUN cd zebrad/; cargo build --release --features enable-sentry
# Runner image

View File

@ -40,7 +40,7 @@ dirs = "3.0.1"
inferno = { version = "0.10.2", default-features = false }
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" }
[build-dependencies]

View File

@ -3,23 +3,32 @@
#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)]
#![forbid(unsafe_code)]
use zebrad::application::APPLICATION;
// use zebrad::application::APPLICATION;
/// Boot Zebrad
fn main() {
if cfg!(feature = "enable-sentry") {
let tracing_integration = sentry_tracing::TracingIntegration::default();
// if cfg!(feature = "enable-sentry") {
// The Sentry default config pulls in the DSN from the `SENTRY_DSN`
// environment variable.
std::mem::forget(sentry::init(
sentry::ClientOptions {
debug: true,
..Default::default()
}
.add_integration(tracing_integration),
));
}
// The Sentry default config pulls in the DSN from the `SENTRY_DSN`
// environment variable.
let _guard = sentry::init(
sentry::ClientOptions {
debug: true,
..Default::default()
}, // .add_integration(sentry_tracing::TracingIntegration::default()),
);
// }
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
#[instrument(skip(self))]
async fn obtain_tips(&mut self) -> Result<(), Report> {
panic!("Everything is on fire!");
let block_locator = self
.state
.ready_and()