Skip to content

Commit 67f006a

Browse files
committed
further conflicts
1 parent fa11cd7 commit 67f006a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,13 @@ impl<R: RuntimeChannel> LogProcessor for BatchLogProcessorWithAsyncRuntime<R> {
534534
)));
535535

536536
// TODO - Implement throttling to prevent error flooding when the queue is full or closed.
537-
if let Err(err) = result {
538-
otel_error!(
539-
name: "BatchLogProcessor.Export.Error",
540-
error = format!("{}", err)
541-
);
537+
if result.is_err() {
538+
// Increment dropped logs count. The first time we have to drop a log,
539+
// emit a warning.
540+
if self.dropped_logs_count.fetch_add(1, Ordering::Relaxed) == 0 {
541+
otel_warn!(name: "BatchLogProcessor.LogDroppingStarted",
542+
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.");
543+
}
542544
}
543545
}
544546

0 commit comments

Comments
 (0)