@@ -102,6 +102,17 @@ pub trait SpanProcessor: Send + Sync + std::fmt::Debug {
102
102
/// `SpanExporter`, as soon as they are finished, without any batching. This is
103
103
/// typically useful for debugging and testing. For scenarios requiring higher
104
104
/// performance/throughput, consider using [BatchSpanProcessor].
105
+ /// Spans are exported synchronously
106
+ /// in the same thread that emits the log record.
107
+ /// When using this processor with the OTLP Exporter, the following exporter
108
+ /// features are supported:
109
+ /// - `grpc-tonic`: This requires TracerProvider to be created within a tokio
110
+ /// runtime. Spans can be emitted from any thread, including tokio runtime
111
+ /// threads.
112
+ /// - `reqwest-blocking-client`: TracerProvider may be created anywhere, but
113
+ /// spans must be emitted from a non-tokio runtime thread.
114
+ /// - `reqwest-client`: TracerProvider may be created anywhere, but spans must be
115
+ /// emitted from a tokio runtime thread.
105
116
#[ derive( Debug ) ]
106
117
pub struct SimpleSpanProcessor {
107
118
exporter : Mutex < Box < dyn SpanExporter > > ,
@@ -171,6 +182,13 @@ use crate::export::trace::ExportResult;
171
182
/// individually. It uses a **dedicated background thread** to manage and export spans
172
183
/// asynchronously, ensuring that the application's main execution flow is not blocked.
173
184
///
185
+ /// When using this processor with the OTLP Exporter, the following exporter
186
+ /// features are supported:
187
+ /// - `grpc-tonic`: This requires `TracerProvider` to be created within a tokio
188
+ /// runtime.
189
+ /// - `reqwest-blocking-client`: Works with a regular `main` or `tokio::main`.
190
+ ///
191
+ /// In other words, other clients like `reqwest` and `hyper` are not supported.
174
192
/// /// # Example
175
193
///
176
194
/// This example demonstrates how to configure and use the `BatchSpanProcessor`
0 commit comments