Expand description
OpenTelemetry-compatible trace collector for debug sessions.
Collects span data during an agent session and serializes to OTLP JSON format
at session end. All text-bearing attributes are redacted via crate::redact::scrub_content
before storage (C-01).
Design notes:
- Uses explicit
begin_X/end_Xmethods with ownedSpanGuard— safe across async.awaitboundaries because no borrow toTracingCollectoris held (C-02). - A
HashMap<usize, IterationEntry>tracks concurrent iterations (I-03). DroponTracingCollectorflushes partial traces on error/panic paths (C-04).- When the
otelfeature is enabled anmpscchannel forwards completed spans to the OTLP exporter intracing_init.rs(C-05).
Structs§
- LlmAttributes
- Attributes for a completed LLM request span.
- Memory
Search Attributes - Attributes for a completed memory search span.
- Span
Data - A completed span ready for OTLP serialization.
- Span
Guard - Owned guard returned by
begin_*methods. Pass back toend_*to close the span. - Tool
Attributes - Attributes for a completed tool call span.
- Trace
Event - Event sent over the mpsc channel to the OTLP exporter.
- Tracing
Collector
Enums§
- Span
Status - Span status code (matches OTLP
StatusCodevalues).
Functions§
- serialize_
otlp_ json - Serialize spans to OTLP JSON Protobuf encoding.