Struct Otlp File Span Exporter
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub struct OtlpFileSpanExporter {
pub format: OtlpFileFormat,
pub writer: Arc<SharedFileWriter>,
pub shutdown: AtomicBool,
pub resource: ResourceAttributesWithSchema,
}
Writes exported spans to a local file as OTLP.
Every export is written, flushed and synced before it returns, so a batch the SDK reports as delivered has reached the disk and a run that dies mid-stream leaves a readable prefix.
Fields
format: OtlpFileFormat
writer: Arc<SharedFileWriter>
shutdown: AtomicBool
resource: ResourceAttributesWithSchema
Implementations
impl OtlpFileSpanExporter
impl OtlpFileSpanExporter
new
pub fn new(
root: &Path,
path: &Path,
format: OtlpFileFormat,
append: bool,
) -> Result<Self>
Creates an exporter writing path in format.
root confines the output and the file is owner-only, as for the ATOF and ATIF sinks: a trajectory carries prompt and response content.
path
pub fn path(&self) -> &Path
Returns the path this exporter writes to.
Trait Implementations
impl Debug for OtlpFileSpanExporter
impl Debug for OtlpFileSpanExporter
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl SpanExporter for OtlpFileSpanExporter
impl SpanExporter for OtlpFileSpanExporter
export
async fn export(&self, batch: Vec<SpanData>) -> OTelSdkResult
shutdown_with_timeout
fn shutdown_with_timeout(&self, _timeout: Duration) -> OTelSdkResult
force_flush
fn force_flush(&self) -> OTelSdkResult
set_resource
fn set_resource(&mut self, resource: &Resource)
shutdown
fn shutdown(&self) -> Result<(), OTelSdkError>