From 69621bd79ad38ed6059443c739886eb5d611b5af Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Fri, 18 Aug 2023 20:42:24 +0100 Subject: [PATCH] chore(log_to_metric transform): add missing Cargo feature (#18308) The `log_to_metric` transform was missing a corresponding Cargo feature. Therefore, when compiling Vector with a reduced set of features, this transform was always included even if not requested. This is the only transform that was missing a Cargo feature. Signed-off-by: Hugo Hromic --- Cargo.toml | 3 +++ src/internal_events/mod.rs | 4 ++++ src/transforms/mod.rs | 1 + 3 files changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 25d36061e7707..3fe804630cea8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -579,6 +579,7 @@ transforms-logs = [ "transforms-aws_ec2_metadata", "transforms-dedupe", "transforms-filter", + "transforms-log_to_metric", "transforms-lua", "transforms-metric_to_log", "transforms-pipelines", @@ -591,6 +592,7 @@ transforms-logs = [ transforms-metrics = [ "transforms-aggregate", "transforms-filter", + "transforms-log_to_metric", "transforms-lua", "transforms-metric_to_log", "transforms-pipelines", @@ -603,6 +605,7 @@ transforms-aggregate = [] transforms-aws_ec2_metadata = ["dep:arc-swap"] transforms-dedupe = ["dep:lru"] transforms-filter = [] +transforms-log_to_metric = [] transforms-lua = ["dep:mlua", "vector-core/lua"] transforms-metric_to_log = [] transforms-pipelines = ["transforms-filter", "transforms-route"] diff --git a/src/internal_events/mod.rs b/src/internal_events/mod.rs index f1073573cb51c..c5a491821399e 100644 --- a/src/internal_events/mod.rs +++ b/src/internal_events/mod.rs @@ -76,6 +76,7 @@ mod journald; mod kafka; #[cfg(feature = "sources-kubernetes_logs")] mod kubernetes_logs; +#[cfg(feature = "transforms-log_to_metric")] mod log_to_metric; mod logplex; #[cfg(feature = "sinks-loki")] @@ -89,6 +90,7 @@ mod mongodb_metrics; #[cfg(feature = "sources-nginx_metrics")] mod nginx_metrics; mod open; +#[cfg(feature = "transforms-log_to_metric")] mod parser; #[cfg(feature = "sources-postgresql_metrics")] mod postgresql_metrics; @@ -213,6 +215,7 @@ pub(crate) use self::journald::*; pub(crate) use self::kafka::*; #[cfg(feature = "sources-kubernetes_logs")] pub(crate) use self::kubernetes_logs::*; +#[cfg(feature = "transforms-log_to_metric")] pub(crate) use self::log_to_metric::*; #[cfg(feature = "sources-heroku_logs")] pub(crate) use self::logplex::*; @@ -224,6 +227,7 @@ pub(crate) use self::lua::*; pub(crate) use self::metric_to_log::*; #[cfg(feature = "sources-nginx_metrics")] pub(crate) use self::nginx_metrics::*; +#[cfg(feature = "transforms-log_to_metric")] pub(crate) use self::parser::*; #[cfg(feature = "sources-postgresql_metrics")] pub(crate) use self::postgresql_metrics::*; diff --git a/src/transforms/mod.rs b/src/transforms/mod.rs index b78dda290b9aa..361e5d68db413 100644 --- a/src/transforms/mod.rs +++ b/src/transforms/mod.rs @@ -12,6 +12,7 @@ pub mod aws_ec2_metadata; pub mod dedupe; #[cfg(feature = "transforms-filter")] pub mod filter; +#[cfg(feature = "transforms-log_to_metric")] pub mod log_to_metric; #[cfg(feature = "transforms-lua")] pub mod lua;