diff --git a/Cargo.lock b/Cargo.lock index 317af86fff..0129941564 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1368,21 +1368,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1698,29 +1683,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite 0.2.14", -] - [[package]] name = "http-client" version = "6.5.3" @@ -1767,61 +1729,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite 0.2.14", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite 0.2.14", - "socket2 0.5.7", - "tokio", - "tower", - "tower-service", - "tracing", -] - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -1910,12 +1817,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ipnet" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" - [[package]] name = "ipnetwork" version = "0.20.0" @@ -2158,16 +2059,6 @@ dependencies = [ "value-bag", ] -[[package]] -name = "loki-api" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674883a98273598ac3aad4301724c56734bea90574c5033af067e8f9fb5eb399" -dependencies = [ - "prost 0.12.6", - "prost-types 0.12.6", -] - [[package]] name = "lz4_flex" version = "0.11.3" @@ -2228,12 +2119,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2301,23 +2186,6 @@ dependencies = [ "getrandom 0.2.15", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nix" version = "0.23.2" @@ -2543,50 +2411,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "openssl" -version = "0.10.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" -dependencies = [ - "bitflags 2.6.0", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -2853,12 +2683,6 @@ dependencies = [ "spki", ] -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - [[package]] name = "plotters" version = "0.3.7" @@ -3010,16 +2834,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive 0.12.6", -] - [[package]] name = "prost" version = "0.13.3" @@ -3027,7 +2841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", - "prost-derive 0.13.3", + "prost-derive", ] [[package]] @@ -3044,26 +2858,13 @@ dependencies = [ "once_cell", "petgraph", "prettyplease", - "prost 0.13.3", - "prost-types 0.13.3", + "prost", + "prost-types", "regex", "syn 2.0.77", "tempfile", ] -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "prost-derive" version = "0.13.3" @@ -3077,22 +2878,13 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", -] - [[package]] name = "prost-types" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ - "prost 0.13.3", + "prost", ] [[package]] @@ -3317,45 +3109,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "reqwest" -version = "0.12.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite 0.2.14", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-registry", -] - [[package]] name = "ring" version = "0.17.8" @@ -3937,12 +3690,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - [[package]] name = "socket2" version = "0.4.10" @@ -4220,15 +3967,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - [[package]] name = "synstructure" version = "0.13.1" @@ -4463,16 +4201,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.0" @@ -4497,17 +4225,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-stream" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" -dependencies = [ - "futures-core", - "pin-project-lite 0.2.14", - "tokio", -] - [[package]] name = "tokio-tungstenite" version = "0.24.0" @@ -4565,33 +4282,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite 0.2.14", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - [[package]] name = "tracing" version = "0.1.40" @@ -4625,17 +4315,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-log" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -4647,27 +4326,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-loki" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea6023f9fe4b69267ccd3ed7d203d931c43c5f82dbaa0f07202bc17193a5f43" -dependencies = [ - "loki-api", - "reqwest", - "serde", - "serde_json", - "snap", - "tokio", - "tokio-stream", - "tracing", - "tracing-core", - "tracing-log 0.1.4", - "tracing-serde", - "tracing-subscriber", - "url", -] - [[package]] name = "tracing-serde" version = "0.1.3" @@ -4695,16 +4353,10 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log 0.2.0", + "tracing-log", "tracing-serde", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "tungstenite" version = "0.24.0" @@ -4954,12 +4606,6 @@ dependencies = [ "sval_serde", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "vec_map" version = "0.8.2" @@ -5004,15 +4650,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -5187,36 +4824,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -5579,7 +5186,7 @@ version = "1.0.0-dev" dependencies = [ "clap", "futures", - "prost 0.13.3", + "prost", "prost-build", "rand 0.8.5", "serde_json", @@ -6118,9 +5725,7 @@ dependencies = [ "rustc_version 0.4.1", "tokio", "tracing", - "tracing-loki", "tracing-subscriber", - "url", "zenoh", "zenoh-config", "zenoh-util", diff --git a/Cargo.toml b/Cargo.toml index b5853f4897..de23d2eea4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,7 +96,6 @@ crossbeam-utils = "0.8.20" derive_more = { version = "1.0.0", features = ["as_ref"] } derive-new = "0.7.0" tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] } -tracing-loki = "0.2" event-listener = "5.3.1" flume = "0.11" form_urlencoded = "1.2.1" diff --git a/zenohd/Cargo.toml b/zenohd/Cargo.toml index c3b94a3eec..a422b0e6c7 100644 --- a/zenohd/Cargo.toml +++ b/zenohd/Cargo.toml @@ -28,7 +28,6 @@ readme = "README.md" [features] default = ["zenoh/default"] shared-memory = ["zenoh/shared-memory"] -loki = ["tracing-loki", "url"] [dependencies] tokio = { workspace = true, features = ["rt-multi-thread"] } @@ -40,8 +39,6 @@ json5 = { workspace = true } lazy_static = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } -tracing-loki = { workspace = true, optional = true } -url = { workspace = true, optional = true } zenoh = { workspace = true, features = [ "unstable", "internal", diff --git a/zenohd/src/main.rs b/zenohd/src/main.rs index e618b6f3db..0e5e9737ee 100644 --- a/zenohd/src/main.rs +++ b/zenohd/src/main.rs @@ -15,21 +15,10 @@ use clap::Parser; use futures::future; use git_version::git_version; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; -#[cfg(feature = "loki")] -use url::Url; use zenoh::{config::WhatAmI, Config, Result}; use zenoh_config::{EndPoint, ModeDependentValue, PermissionsConf}; use zenoh_util::LibSearchDirs; -#[cfg(feature = "loki")] -const LOKI_ENDPOINT_VAR: &str = "LOKI_ENDPOINT"; - -#[cfg(feature = "loki")] -const LOKI_API_KEY_VAR: &str = "LOKI_API_KEY"; - -#[cfg(feature = "loki")] -const LOKI_API_KEY_HEADER_VAR: &str = "LOKI_API_KEY_HEADER"; - const GIT_VERSION: &str = git_version!(prefix = "v", cargo_prefix = "v"); lazy_static::lazy_static!( @@ -291,46 +280,10 @@ fn init_logging() -> Result<()> { .with(env_filter) .with(fmt_layer); - #[cfg(feature = "loki")] - match ( - get_loki_endpoint(), - get_loki_apikey(), - get_loki_apikey_header(), - ) { - (Some(loki_url), Some(header), Some(apikey)) => { - let (loki_layer, task) = tracing_loki::builder() - .label("service", "zenoh")? - .http_header(header, apikey)? - .build_url(Url::parse(&loki_url)?)?; - - tracing_sub.with(loki_layer).init(); - tokio::spawn(task); - return Ok(()); - } - _ => { - tracing::warn!("Missing one of the required header for Loki!") - } - }; - tracing_sub.init(); Ok(()) } -#[cfg(feature = "loki")] -pub fn get_loki_endpoint() -> Option { - std::env::var(LOKI_ENDPOINT_VAR).ok() -} - -#[cfg(feature = "loki")] -pub fn get_loki_apikey() -> Option { - std::env::var(LOKI_API_KEY_VAR).ok() -} - -#[cfg(feature = "loki")] -pub fn get_loki_apikey_header() -> Option { - std::env::var(LOKI_API_KEY_HEADER_VAR).ok() -} - #[test] #[cfg(feature = "default")] fn test_default_features() {