//! `TraceExporter` trait — the contract for shipping spans to a backend.
useasync_trait::async_trait;usecrate::error::TraceError;usecrate::span::{ScoreRecord, Span};/// One backend's contract: receive batches of completed spans (and
/// optionally scores), flush on shutdown.
#[async_trait]pubtraitTraceExporter: Send + Sync {/// Ship a batch of completed spans. Called from the batcher's flush
/// task — implementations should not block forever and should return
/// errors for retry/logging by the bridge.
async fnexport_spans(&self, spans:Vec<Span>)->Result<(), TraceError>;/// Ship a batch of scores. Default returns `Unsupported`.
async fnexport_scores(&self, _scores:Vec<ScoreRecord>)->Result<(), TraceError>{Err(TraceError::Unsupported("scores"))}/// Graceful flush + close. Default is a no-op.
async fnshutdown(&self)->Result<(), TraceError>{Ok(())}/// Stable name for diagnostics (e.g. "langfuse", "stdout").
fnname(&self)->&str;}