Tracing & OpenTelemetry
Tracing & OpenTelemetry
Section titled “Tracing & OpenTelemetry”Every model invocation, tool execution, and agent turn in Dewee generates structured OpenTelemetry-compatible traces (internal/tracing/).
Tracing Architecture
Section titled “Tracing Architecture”- Span Hierarchy:
agent_run→model_turn→tool_execution→observation_capture. - Prompt Cache Metrics: Tracks cache read and cache creation tokens for Anthropic and OpenAI models.
- Cost Rollups: Calculates estimated token expenses per session and workspace.
CLI Tracing Commands
Section titled “CLI Tracing Commands”# Follow real-time trace stream from the gatewaydewee traces follow
# List recent execution traces with error statusdewee traces list --status error
# Inspect full structured JSON span detailsdewee traces get <trace-id>
# Export trace data for external ingestiondewee traces export <trace-id>