Skip to content

Commit 13449b8

Browse files
committed
Improve comments
1 parent 43030bf commit 13449b8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bottlecap/src/logs/flusher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Flusher {
5454

5555
pub async fn flush(&self, batches: Option<Arc<Vec<Vec<u8>>>>) -> Vec<reqwest::RequestBuilder> {
5656
let Some(api_key) = self.api_key_factory.get_api_key().await else {
57-
error!("Skipping flush: Failed to resolve API key");
57+
error!("Skipping flushing logs: Failed to resolve API key");
5858
return vec![];
5959
};
6060

bottlecap/src/traces/trace_flusher.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl TraceFlusher for ServerlessTraceFlusher {
5858

5959
async fn flush(&self, failed_traces: Option<Vec<SendData>>) -> Option<Vec<SendData>> {
6060
let Some(api_key) = self.api_key_factory.get_api_key().await else {
61-
error!("Skipping flush in trace flusher: Failed to resolve API key");
61+
error!("Skipping flushing traces: Failed to resolve API key");
6262
return None;
6363
};
6464

@@ -83,6 +83,7 @@ impl TraceFlusher for ServerlessTraceFlusher {
8383
while !trace_builders.is_empty() {
8484
let traces: Vec<_> = trace_builders
8585
.into_iter()
86+
// Lazily set the API key
8687
.map(|builder| builder.with_api_key(&api_key))
8788
.map(SendDataBuilder::build)
8889
.collect();

0 commit comments

Comments
 (0)