get_span_buffer()
Signature
Returns a SpanBuffer context manager that routes all spans created within it into a local queue instead of exporting them immediately. This enables manual batch collection and deferred export.
Example
SpanBuffer methods
All span creation within the buffer context (including decorator-created spans and tracer calls) is buffered. Extract spans with get_all_spans() before exiting the context, then use client.process_spans() to export them.