Skip to content

Commit 85fcb46

Browse files
change log level to trace for some verbose logs in dogstatsd (#65)
1 parent 0f1d0b6 commit 85fcb46

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

crates/dogstatsd/src/datadog.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::fs::File;
1818
use std::io::{BufReader, Write};
1919
use std::sync::OnceLock;
2020
use std::time::Duration;
21-
use tracing::{debug, error};
21+
use tracing::{debug, error, trace};
2222
use zstd::stream::write::Encoder;
2323
use zstd::zstd_safe::CompressionLevel;
2424

@@ -173,7 +173,7 @@ impl DdApi {
173173
let url = format!("{}/api/v2/series", &self.metrics_intake_url_prefix);
174174
let safe_body = serde_json::to_vec(&series)
175175
.map_err(|e| ShippingError::Payload(format!("Failed to serialize series: {e}")))?;
176-
debug!("Sending body: {:?}", &series);
176+
trace!("Sending body: {:?}", &series);
177177
self.ship_data(url, safe_body, "application/json").await
178178
}
179179

@@ -185,7 +185,7 @@ impl DdApi {
185185
let safe_body = sketches
186186
.write_to_bytes()
187187
.map_err(|e| ShippingError::Payload(format!("Failed to serialize series: {e}")))?;
188-
debug!("Sending distributions: {:?}", &sketches);
188+
trace!("Sending distributions: {:?}", &sketches);
189189
self.ship_data(url, safe_body, "application/x-protobuf")
190190
.await
191191
// TODO maybe go to coded output stream if we incrementally

crates/dogstatsd/src/dogstatsd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::str::Split;
77
use crate::aggregator_service::AggregatorHandle;
88
use crate::errors::ParseError::UnsupportedType;
99
use crate::metric::{id, parse, Metric};
10-
use tracing::{debug, error};
10+
use tracing::{debug, error, trace};
1111

1212
pub struct DogStatsD {
1313
cancel_token: tokio_util::sync::CancellationToken,
@@ -89,7 +89,7 @@ impl DogStatsD {
8989

9090
#[allow(clippy::expect_used)]
9191
let msgs = std::str::from_utf8(&buf).expect("couldn't parse as string");
92-
debug!("Received message: {} from {}", msgs, src);
92+
trace!("Received message: {} from {}", msgs, src);
9393
let statsd_metric_strings = msgs.split('\n');
9494
self.insert_metrics(statsd_metric_strings);
9595
}

0 commit comments

Comments
 (0)