Skip to content

Commit d7553e7

Browse files
committed
add doc warning about simple
1 parent 59da6f1 commit d7553e7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

opentelemetry-sdk/src/logs/log_processor.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ pub trait LogProcessor: Send + Sync + Debug {
5252
fn event_enabled(&self, level: Severity, target: &str, name: &str) -> bool;
5353
}
5454

55-
/// A [`LogProcessor`] that exports synchronously when logs are emitted.
56-
///
57-
/// # Examples
58-
///
59-
/// Note that the simple processor exports synchronously every time a log is
60-
/// emitted. If you find this limiting, consider the batch processor instead.
55+
/// A [LogProcessor] that passes logs to the configured `LogExporter`, as soon
56+
/// as they are emitted, without any batching. This is typically useful for
57+
/// debugging and testing. For scenarios requiring higher
58+
/// performance/throughput, consider using [BatchSpanProcessor].
6159
#[derive(Debug)]
6260
pub struct SimpleLogProcessor {
6361
exporter: Mutex<Box<dyn LogExporter>>,

opentelemetry-sdk/src/trace/span_processor.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ pub trait SpanProcessor: Send + Sync + std::fmt::Debug {
9494
fn shutdown(&mut self) -> TraceResult<()>;
9595
}
9696

97-
/// A [SpanProcessor] that passes finished spans to the configured `SpanExporter`, as
98-
/// soon as they are finished, without any batching.
97+
/// A [SpanProcessor] that passes finished spans to the configured
98+
/// `SpanExporter`, as soon as they are finished, without any batching. This is
99+
/// typically useful for debugging and testing. For scenarios requiring higher
100+
/// performance/throughput, consider using [BatchSpanProcessor].
99101
#[derive(Debug)]
100102
pub struct SimpleSpanProcessor {
101103
exporter: Mutex<Box<dyn SpanExporter>>,

0 commit comments

Comments
 (0)