From ab600bcf1b4cc2dec1cdaaa8a23fa49d157479a4 Mon Sep 17 00:00:00 2001 From: Yiming Luo Date: Thu, 8 Jan 2026 17:39:49 -0500 Subject: [PATCH 1/3] [SVLS-7945] feat: Support TLS certificate for dogstatsd metrics flusher --- bottlecap/Cargo.lock | 5 +++-- bottlecap/Cargo.toml | 4 ++-- bottlecap/src/bin/bottlecap/main.rs | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index d3352237f..dcc711521 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -727,7 +727,7 @@ dependencies = [ [[package]] name = "datadog-fips" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=fd8b7a9bcec2f19b305bb74b7195ca3910538e5b#fd8b7a9bcec2f19b305bb74b7195ca3910538e5b" +source = "git+https://github.com/DataDog/serverless-components?rev=30a4a3495c805cd29dc2087ea32e96611eef49be#30a4a3495c805cd29dc2087ea32e96611eef49be" dependencies = [ "reqwest", "rustls", @@ -836,7 +836,7 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=fd8b7a9bcec2f19b305bb74b7195ca3910538e5b#fd8b7a9bcec2f19b305bb74b7195ca3910538e5b" +source = "git+https://github.com/DataDog/serverless-components?rev=30a4a3495c805cd29dc2087ea32e96611eef49be#30a4a3495c805cd29dc2087ea32e96611eef49be" dependencies = [ "datadog-fips", "datadog-protos", @@ -847,6 +847,7 @@ dependencies = [ "protobuf", "regex", "reqwest", + "rustls-pemfile", "serde", "serde_json", "thiserror 1.0.69", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 723c57f3d..106a910b2 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -71,8 +71,8 @@ libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "73c6 libdd-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } libdd-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "fd8b7a9bcec2f19b305bb74b7195ca3910538e5b", default-features = false } -datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "fd8b7a9bcec2f19b305bb74b7195ca3910538e5b", default-features = false } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "30a4a3495c805cd29dc2087ea32e96611eef49be", default-features = false } +datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "30a4a3495c805cd29dc2087ea32e96611eef49be", default-features = false } libddwaf = { version = "1.28.1", git = "https://github.com/DataDog/libddwaf-rust", rev = "d1534a158d976bd4f747bf9fcc58e0712d2d17fc", default-features = false, features = ["serde"] } [dev-dependencies] diff --git a/bottlecap/src/bin/bottlecap/main.rs b/bottlecap/src/bin/bottlecap/main.rs index e68996c3b..4c303219b 100644 --- a/bottlecap/src/bin/bottlecap/main.rs +++ b/bottlecap/src/bin/bottlecap/main.rs @@ -1622,6 +1622,7 @@ fn start_metrics_flushers( aggregator_handle: metrics_aggr_handle.clone(), metrics_intake_url_prefix: metrics_intake_url.expect("can't parse site or override"), https_proxy: config.proxy_https.clone(), + ca_cert_path: config.tls_cert_file.clone(), timeout: Duration::from_secs(config.flush_timeout), retry_strategy: DsdRetryStrategy::Immediate(3), compression_level: config.metrics_config_compression_level, @@ -1651,6 +1652,7 @@ fn start_metrics_flushers( aggregator_handle: metrics_aggr_handle.clone(), metrics_intake_url_prefix: metrics_intake_url.clone(), https_proxy: config.proxy_https.clone(), + ca_cert_path: config.tls_cert_file.clone(), timeout: Duration::from_secs(config.flush_timeout), retry_strategy: DsdRetryStrategy::Immediate(3), compression_level: config.metrics_config_compression_level, From e041b26566125c27a8b95ae62aa65f5f3c448fd9 Mon Sep 17 00:00:00 2001 From: Yiming Luo Date: Fri, 9 Jan 2026 11:03:30 -0500 Subject: [PATCH 2/3] Update serverless-components --- bottlecap/Cargo.lock | 4 ++-- bottlecap/Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bottlecap/Cargo.lock b/bottlecap/Cargo.lock index dcc711521..313ef20f9 100644 --- a/bottlecap/Cargo.lock +++ b/bottlecap/Cargo.lock @@ -727,7 +727,7 @@ dependencies = [ [[package]] name = "datadog-fips" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=30a4a3495c805cd29dc2087ea32e96611eef49be#30a4a3495c805cd29dc2087ea32e96611eef49be" +source = "git+https://github.com/DataDog/serverless-components?rev=18b49baba8bfef97060d7edd8b830584d0da3373#18b49baba8bfef97060d7edd8b830584d0da3373" dependencies = [ "reqwest", "rustls", @@ -836,7 +836,7 @@ dependencies = [ [[package]] name = "dogstatsd" version = "0.1.0" -source = "git+https://github.com/DataDog/serverless-components?rev=30a4a3495c805cd29dc2087ea32e96611eef49be#30a4a3495c805cd29dc2087ea32e96611eef49be" +source = "git+https://github.com/DataDog/serverless-components?rev=18b49baba8bfef97060d7edd8b830584d0da3373#18b49baba8bfef97060d7edd8b830584d0da3373" dependencies = [ "datadog-fips", "datadog-protos", diff --git a/bottlecap/Cargo.toml b/bottlecap/Cargo.toml index 106a910b2..6efb6ca60 100644 --- a/bottlecap/Cargo.toml +++ b/bottlecap/Cargo.toml @@ -71,8 +71,8 @@ libdd-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "73c6 libdd-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } libdd-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } libdd-trace-stats = { git = "https://github.com/DataDog/libdatadog", rev = "73c675b79f81978ee1190be6af0c5abec997e3b0" } -dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "30a4a3495c805cd29dc2087ea32e96611eef49be", default-features = false } -datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "30a4a3495c805cd29dc2087ea32e96611eef49be", default-features = false } +dogstatsd = { git = "https://github.com/DataDog/serverless-components", rev = "18b49baba8bfef97060d7edd8b830584d0da3373", default-features = false } +datadog-fips = { git = "https://github.com/DataDog/serverless-components", rev = "18b49baba8bfef97060d7edd8b830584d0da3373", default-features = false } libddwaf = { version = "1.28.1", git = "https://github.com/DataDog/libddwaf-rust", rev = "d1534a158d976bd4f747bf9fcc58e0712d2d17fc", default-features = false, features = ["serde"] } [dev-dependencies] From 946b555362b1aa53f0813e92a92ca81e6a949047 Mon Sep 17 00:00:00 2001 From: Yiming Luo Date: Fri, 9 Jan 2026 11:14:49 -0500 Subject: [PATCH 3/3] Update test --- bottlecap/tests/metrics_integration_test.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bottlecap/tests/metrics_integration_test.rs b/bottlecap/tests/metrics_integration_test.rs index 60e596a28..c7ca6b134 100644 --- a/bottlecap/tests/metrics_integration_test.rs +++ b/bottlecap/tests/metrics_integration_test.rs @@ -52,6 +52,7 @@ async fn test_enhanced_metrics() { metrics_intake_url_prefix: MetricsIntakeUrlPrefix::new(None, Some(metrics_site_override)) .expect("can't parse metrics intake URL from site"), https_proxy: None, + ca_cert_path: None, timeout: std::time::Duration::from_secs(5), retry_strategy: dogstatsd::datadog::RetryStrategy::Immediate(1), compression_level: 6,