diff --git a/Cargo.lock b/Cargo.lock index 9ea59c4..e43e393 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,7 +46,7 @@ dependencies = [ [[package]] name = "alpaca-data-relay" -version = "1.1.0" +version = "1.1.1" dependencies = [ "alpaca", "anyhow", @@ -94,9 +94,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "78ed203b9ba68b242c62b3fb7480f589dd49829be1edb3fe8fc8b4ffda2dcb8d" dependencies = [ "addr2line", "cfg-if 1.0.0", @@ -561,6 +561,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "httpdate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" + [[package]] name = "hyper" version = "0.13.10" @@ -575,7 +581,7 @@ dependencies = [ "http", "http-body 0.3.1", "httparse", - "httpdate", + "httpdate 0.3.2", "itoa", "pin-project", "socket2 0.3.19", @@ -587,9 +593,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" +checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54" dependencies = [ "bytes 1.0.1", "futures-channel", @@ -599,7 +605,7 @@ dependencies = [ "http", "http-body 0.4.1", "httparse", - "httpdate", + "httpdate 1.0.0", "itoa", "pin-project", "socket2 0.4.0", @@ -629,7 +635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes 1.0.1", - "hyper 0.14.5", + "hyper 0.14.7", "native-tls", "tokio 1.5.0", "tokio-native-tls", @@ -736,9 +742,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lexical-core" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec", "bitflags", @@ -1282,9 +1288,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" dependencies = [ "aho-corasick", "memchr", @@ -1365,7 +1371,7 @@ dependencies = [ "futures-util", "http", "http-body 0.4.1", - "hyper 0.14.5", + "hyper 0.14.7", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -1479,7 +1485,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "933beb0343c84eefd69a368318e9291b179e09e51982d49c65d7b362b0e9466f" dependencies = [ - "httpdate", + "httpdate 0.3.2", "reqwest 0.10.10", "sentry-backtrace", "sentry-contexts", @@ -1658,9 +1664,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "smallvec" @@ -1697,9 +1703,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "syn" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fe99c6bd8b1cc636890bcc071842de909d902c81ac7dab53ba33c421ab8ffb" +checksum = "b9505f307c872bab8eb46f77ae357c8eba1fdacead58ee5a850116b1d7f82883" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 8ff5223..1bb266d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alpaca-data-relay" -version = "1.1.0" +version = "1.1.1" authors = ["Sebastian Rollen "] edition = "2018" diff --git a/src/lib.rs b/src/lib.rs index b37d925..ade34d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ use anyhow::Result; use futures::StreamExt; use kafka_settings::producer; use rdkafka::producer::FutureRecord; +use sentry_anyhow::capture_anyhow; use std::time::Duration; use tracing::{debug, error, info}; @@ -51,13 +52,23 @@ pub async fn run(settings: Settings) -> Result<()> { ) .await; if let Err((e, msg)) = send { + let e = e.into(); + capture_anyhow(&e); error!("Failed to send msg to Kafka: {:?}. Error: {}", msg, e) } } - Err(e) => error!("Failed to serialize payload: {:?}. Error: {}", &message, e), + Err(e) => { + let e = e.into(); + capture_anyhow(&e); + error!("Failed to serialize payload: {:?}. Error: {}", &message, e) + } } } - Err(e) => error!("Failed to receive message from the WebSocket: {}", e), + Err(e) => { + let e = e.into(); + capture_anyhow(&e); + error!("Failed to receive message from the WebSocket: {}", e) + } } }) .await;