diff options
Diffstat (limited to 'pingora-core')
-rw-r--r-- | pingora-core/Cargo.toml | 9 | ||||
-rw-r--r-- | pingora-core/src/server/mod.rs | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pingora-core/Cargo.toml b/pingora-core/Cargo.toml index 496e401..3534aea 100644 --- a/pingora-core/Cargo.toml +++ b/pingora-core/Cargo.toml @@ -51,7 +51,7 @@ sentry = { version = "0.26", features = [ "panic", "reqwest", "rustls", -], default-features = false } +], default-features = false, optional = true } regex = "1" percent-encoding = "2.1" parking_lot = { version = "0.12", features = ["arc_lock"] } @@ -77,7 +77,9 @@ windows-sys = { version = "0.59.0", features = ["Win32_Networking_WinSock"] } [dev-dependencies] matches = "0.1" env_logger = "0.9" -reqwest = { version = "0.11", features = ["rustls"], default-features = false } +reqwest = { version = "0.11", features = [ + "rustls-tls", +], default-features = false } hyper = "0.14" [target.'cfg(unix)'.dev-dependencies] @@ -88,5 +90,6 @@ jemallocator = "0.5" default = ["openssl"] openssl = ["pingora-openssl", "some_tls"] boringssl = ["pingora-boringssl", "some_tls"] +sentry = ["dep:sentry"] patched_http1 = [] -some_tls = []
\ No newline at end of file +some_tls = [] diff --git a/pingora-core/src/server/mod.rs b/pingora-core/src/server/mod.rs index d9e57dd..0a2977d 100644 --- a/pingora-core/src/server/mod.rs +++ b/pingora-core/src/server/mod.rs @@ -22,6 +22,7 @@ use daemon::daemonize; use log::{debug, error, info, warn}; use pingora_runtime::Runtime; use pingora_timeout::fast_timeout; +#[cfg(feature = "sentry")] use sentry::ClientOptions; use std::sync::Arc; use std::thread; @@ -67,6 +68,7 @@ pub struct Server { pub configuration: Arc<ServerConf>, /// The parser command line options pub options: Option<Opt>, + #[cfg(feature = "sentry")] /// The Sentry ClientOptions. /// /// Panics and other events sentry captures will be sent to this DSN **only in release mode** @@ -191,6 +193,7 @@ impl Server { shutdown_recv: rx, configuration: Arc::new(conf), options: Some(opt), + #[cfg(feature = "sentry")] sentry: None, } } @@ -231,6 +234,7 @@ impl Server { shutdown_recv: rx, configuration: Arc::new(conf), options: opt, + #[cfg(feature = "sentry")] sentry: None, }) } |