-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svls 6036 respect timeouts #851
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #851 +/- ##
==========================================
+ Coverage 71.44% 72.07% +0.63%
==========================================
Files 317 323 +6
Lines 46656 47968 +1312
==========================================
+ Hits 33334 34574 +1240
- Misses 13322 13394 +72
|
BenchmarksComparisonBenchmark execution time: 2025-02-05 20:36:13 Comparing candidate commit 1470851 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
dogstatsd/src/datadog.rs
Outdated
.send() | ||
.await; | ||
debug!("Sending body: {:?}", &series); | ||
let body = serde_json::to_vec(&series).expect("failed to serialize series"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let body = serde_json::to_vec(&series).expect("failed to serialize series"); | |
let body = serde_json::to_vec(&series).context("failed to serialize series")?; |
Lets avoid the use of panic as much as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved the old behavior, but agree, I will handle the error safely
dogstatsd/src/datadog.rs
Outdated
let url = format!("{}/api/beta/sketches", &self.metrics_intake_url_prefix); | ||
debug!("Sending distributions: {:?}", &sketches); | ||
let body = sketches.write_to_bytes().expect("can't write to buffer"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let body = sketches.write_to_bytes().expect("can't write to buffer"); | |
let body = sketches.write_to_bytes().context("can't write to buffer")?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved the old behavior, but agree, I will handle the error safely
self.dd_api.ship_series(&a_batch).await; | ||
// TODO(astuyve) retry and do not panic | ||
let dd_api_clone = self.dd_api.clone(); | ||
tokio::spawn(async move { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we wait for this to return when we flush? Otherwise we may lose data here
this change make the configured flushing time out respected