Struct opentelemetry_sdk::trace::SimpleSpanProcessor
source · pub struct SimpleSpanProcessor { /* private fields */ }
Expand description
A SpanProcessor that passes finished spans to the configured
SpanExporter
, as soon as they are finished, without any batching. This is
typically useful for debugging and testing. For scenarios requiring higher
performance/throughput, consider using BatchSpanProcessor.
Trait Implementations§
source§impl Debug for SimpleSpanProcessor
impl Debug for SimpleSpanProcessor
source§impl SpanProcessor for SimpleSpanProcessor
impl SpanProcessor for SimpleSpanProcessor
source§fn on_start(&self, _span: &mut Span, _cx: &Context)
fn on_start(&self, _span: &mut Span, _cx: &Context)
on_start
is called when a Span
is started. This method is called
synchronously on the thread that started the span, therefore it should
not block or throw exceptions.source§fn on_end(&self, span: SpanData)
fn on_end(&self, span: SpanData)
on_end
is called after a Span
is ended (i.e., the end timestamp is
already set). This method is called synchronously within the Span::end
API, therefore it should not block or throw an exception.source§fn force_flush(&self) -> TraceResult<()>
fn force_flush(&self) -> TraceResult<()>
Force the spans lying in the cache to be exported.
source§fn shutdown(&self) -> TraceResult<()>
fn shutdown(&self) -> TraceResult<()>
Shuts down the processor. Called when SDK is shut down. This is an
opportunity for processors to do any cleanup required. Read more
source§fn set_resource(&mut self, resource: &Resource)
fn set_resource(&mut self, resource: &Resource)
Set the resource for the log processor.
Auto Trait Implementations§
impl !Freeze for SimpleSpanProcessor
impl RefUnwindSafe for SimpleSpanProcessor
impl Send for SimpleSpanProcessor
impl Sync for SimpleSpanProcessor
impl Unpin for SimpleSpanProcessor
impl UnwindSafe for SimpleSpanProcessor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more