diff --git a/lib/vector-config/src/external/serde_with.rs b/lib/vector-config/src/external/serde_with.rs index 05de17e3bf605..30267e2253943 100644 --- a/lib/vector-config/src/external/serde_with.rs +++ b/lib/vector-config/src/external/serde_with.rs @@ -50,7 +50,7 @@ where impl Configurable for serde_with::DurationSeconds { fn referenceable_name() -> Option<&'static str> { // We're masking the type parameters here because we only deal with whole seconds via this - // version, and handle fractional seconds with `DurationSeconds`, which we + // version, and handle fractional seconds with `DurationSecondsWithFrac`, which we // expose as `serde_with::DurationFractionalSeconds`. Some("serde_with::DurationSeconds") } @@ -76,7 +76,7 @@ impl Configurable for serde_with::DurationSeconds { +impl Configurable for serde_with::DurationSecondsWithFrac { fn referenceable_name() -> Option<&'static str> { // We're masking the type parameters here because we only deal with fractional seconds via this // version, and handle whole seconds with `DurationSeconds`, which we diff --git a/src/sources/demo_logs.rs b/src/sources/demo_logs.rs index fa92cd3ac0681..9d0454ed4f933 100644 --- a/src/sources/demo_logs.rs +++ b/src/sources/demo_logs.rs @@ -48,7 +48,7 @@ pub struct DemoLogsConfig { #[derivative(Default(value = "default_interval()"))] #[serde(default = "default_interval")] #[configurable(metadata(docs::examples = 1.0, docs::examples = 0.1, docs::examples = 0.01,))] - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] pub interval: Duration, /// The total number of lines to output. diff --git a/src/sources/gcp_pubsub.rs b/src/sources/gcp_pubsub.rs index d38688592d4fd..b92062553f4cd 100644 --- a/src/sources/gcp_pubsub.rs +++ b/src/sources/gcp_pubsub.rs @@ -162,7 +162,7 @@ pub struct PubsubConfig { /// How often to poll the currently active streams to see if they /// are all busy and so open a new stream. #[serde(default = "default_poll_time")] - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] #[configurable(metadata(docs::human_name = "Poll Time"))] pub poll_time_seconds: Duration, @@ -184,7 +184,7 @@ pub struct PubsubConfig { /// The amount of time, in seconds, to wait between retry attempts after an error. #[serde(default = "default_retry_delay")] - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] #[configurable(metadata(docs::human_name = "Retry Delay"))] pub retry_delay_secs: Duration, @@ -198,7 +198,7 @@ pub struct PubsubConfig { /// before sending a keepalive request. If this is set larger than /// `60`, you may see periodic errors sent from the server. #[serde(default = "default_keepalive")] - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] #[configurable(metadata(docs::human_name = "Keepalive"))] pub keepalive_secs: Duration, diff --git a/src/sources/internal_metrics.rs b/src/sources/internal_metrics.rs index ddf09afb095cc..6ae574436160a 100644 --- a/src/sources/internal_metrics.rs +++ b/src/sources/internal_metrics.rs @@ -27,7 +27,7 @@ use crate::{ #[serde(deny_unknown_fields, default)] pub struct InternalMetricsConfig { /// The interval between metric gathering, in seconds. - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] #[serde(default = "default_scrape_interval")] #[configurable(metadata(docs::human_name = "Scrape Interval"))] pub scrape_interval_secs: Duration, diff --git a/src/transforms/throttle.rs b/src/transforms/throttle.rs index 740e99477bc2f..9c64f95a7d3cc 100644 --- a/src/transforms/throttle.rs +++ b/src/transforms/throttle.rs @@ -30,7 +30,7 @@ pub struct ThrottleConfig { threshold: u32, /// The time window in which the configured `threshold` is applied, in seconds. - #[serde_as(as = "serde_with::DurationSeconds")] + #[serde_as(as = "serde_with::DurationSecondsWithFrac")] #[configurable(metadata(docs::human_name = "Time Window"))] window_secs: Duration,