Skip to content

Commit 8aaf156

Browse files
Apply suggestions from code review
Co-authored-by: Cijo Thomas <[email protected]>
1 parent b626d7f commit 8aaf156

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ pub struct BatchLogProcessor<R: RuntimeChannel> {
156156
message_sender: R::Sender<BatchMessage>,
157157

158158
// Track dropped logs. We'll log this at shutdown and also emit
159-
// as a metric.
160159
dropped_logs_count: AtomicUsize,
161160

162161
// Track the maximum queue size that was configured for this processor
@@ -180,11 +179,11 @@ impl<R: RuntimeChannel> LogProcessor for BatchLogProcessor<R> {
180179

181180
// TODO - Implement throttling to prevent error flooding when the queue is full or closed.
182181
if result.is_err() {
183-
// Increment dropped logs counter and metric. The first time we have top drop a log,
182+
// Increment dropped logs count. The first time we have to drop a log,
184183
// emit a warning.
185184
if self.dropped_logs_count.fetch_add(1, Ordering::Relaxed) == 0 {
186185
otel_warn!(name: "BatchLogProcessor.LogDroppingStarted",
187-
message = "Beginning to drop log messages due to full exporter queue.");
186+
message = "BatchLogProcessor dropped a LogRecord due to queue full/internal errors. No further log will be emitted for further drops until Shutdown. During Shutdown time, a log will be emitted with exact count of total logs dropped.");
188187
}
189188
}
190189
}
@@ -208,7 +207,7 @@ impl<R: RuntimeChannel> LogProcessor for BatchLogProcessor<R> {
208207
name: "BatchLogProcessor.LogsDropped",
209208
dropped_logs_count = dropped_logs,
210209
max_queue_size = max_queue_size,
211-
message = "Logs were dropped due to a full or closed queue. The count represents the total count of lost logs in the lifetime of the BatchLogProcessor. Consider increasing the queue size and/or decrease delay between intervals."
210+
message = "Logs were dropped due to a queue being full or other error. The count represents the total count of lost dropped in the lifetime of this BatchLogProcessor. Consider increasing the queue size and/or decrease delay between intervals."
212211
);
213212
}
214213

0 commit comments

Comments
 (0)