Skip to content

Commit 3395f6e

Browse files
authored
Update dogstatsd to use retry pushed to client (#617)
* feat: use dsdrs retry strategy * feat: bump * fix: update statsd * ff libdatadog main * feat: use updated statsd with faster tag parser * fix: fmt * fix: pass retry strategy to test
1 parent d365eba commit 3395f6e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

bottlecap/Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bottlecap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ datadog-trace-utils = { git = "https://github.com/DataDog/libdatadog", rev = "4b
1515
datadog-trace-mini-agent = { git = "https://github.com/DataDog/libdatadog", rev = "4ba2f3a7b6bc298035bad8721134a4c34fdd2f1a" }
1616
datadog-trace-normalization = { git = "https://github.com/DataDog/libdatadog", rev = "4ba2f3a7b6bc298035bad8721134a4c34fdd2f1a" }
1717
datadog-trace-obfuscation = { git = "https://github.com/DataDog/libdatadog", rev = "4ba2f3a7b6bc298035bad8721134a4c34fdd2f1a" }
18-
dogstatsd = { git = "https://github.com/DataDog/libdatadog", rev = "89754a92d3725c10b6e6e14202efd541a9fdc5a7" }
18+
dogstatsd = { git = "https://github.com/DataDog/libdatadog", rev = "7982adc0c6966925f66625ca57759c0d7089a54d" }
1919
figment = { version = "0.10", default-features = false, features = ["yaml", "env"] }
2020
hyper = { version = "0.14", default-features = false, features = ["server"] }
2121
lazy_static = { version = "1.5", default-features = false }

bottlecap/src/bin/bottlecap/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ use dogstatsd::{
4848
aggregator::Aggregator as MetricsAggregator,
4949
constants::CONTEXTS,
5050
datadog::{
51-
DdDdUrl, DdUrl, MetricsIntakeUrlPrefix, MetricsIntakeUrlPrefixOverride, Site as MetricsSite,
51+
DdDdUrl, DdUrl, MetricsIntakeUrlPrefix, MetricsIntakeUrlPrefixOverride,
52+
RetryStrategy as DsdRetryStrategy, Site as MetricsSite,
5253
},
5354
dogstatsd::{DogStatsD, DogStatsDConfig},
5455
flusher::{Flusher as MetricsFlusher, FlusherConfig as MetricsFlusherConfig},
@@ -678,6 +679,7 @@ fn start_metrics_flusher(
678679
metrics_intake_url_prefix: metrics_intake_url.expect("can't parse site or override"),
679680
https_proxy: config.https_proxy.clone(),
680681
timeout: Duration::from_secs(config.flush_timeout),
682+
retry_strategy: DsdRetryStrategy::Immediate(3),
681683
};
682684
MetricsFlusher::new(flusher_config)
683685
}

bottlecap/tests/metrics_integration_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ async fn test_enhanced_metrics() {
5050
.expect("can't parse metrics intake URL from site"),
5151
https_proxy: None,
5252
timeout: std::time::Duration::from_secs(5),
53+
retry_strategy: dogstatsd::datadog::RetryStrategy::Immediate(1),
5354
};
5455
let mut metrics_flusher = MetricsFlusher::new(flusher_config);
5556
let lambda_enhanced_metrics =

0 commit comments

Comments
 (0)