Skip to content

Tracing & OpenTelemetry

.md

Every model invocation, tool execution, and agent turn in Dewee generates structured OpenTelemetry-compatible traces (internal/tracing/).

  • Span Hierarchy: agent_runmodel_turntool_executionobservation_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.
Terminal window
# Follow real-time trace stream from the gateway
dewee traces follow
# List recent execution traces with error status
dewee traces list --status error
# Inspect full structured JSON span details
dewee traces get <trace-id>
# Export trace data for external ingestion
dewee traces export <trace-id>