trace • Rust AI Agent SDK
Trace Module for PraisonAI Rust SDK.
trace
Rust AI Agent SDK
Trace Module for PraisonAI Rust SDK.
Provides tracing and observability for agent execution.
Example
use praisonai::trace::{TraceContext, Span, SpanKind};
let mut ctx = TraceContext::new("my-trace");
let span = ctx.start_span("agent-execution", SpanKind::Internal);
// ... do work ...
ctx.end_span(span);Import
use praisonai::trace::*;Classes
Span
A span representing a unit of work.
SpanEventAn event within a span.
TraceContextContext for a trace.
ConsoleExporterConsole exporter (prints to stdout).
JsonFileExporterJSON file exporter.
TracerGlobal tracer for convenience.
ContextEventA context event for replay/debugging.
ContextNoOpSinkNo-op sink (does nothing, zero overhead).
ContextListSinkList sink (stores events in memory).
ContextTraceEmitterContext trace emitter.
TraceExporterTrait for trace exporters.
ContextTraceSinkProtocolProtocol trait for context trace sinks.
SpanKindKind of span.
SpanStatusStatus of a span.
ContextEventTypeType of context event.