Expand description
Telemetry and usage tracking
Tracks token usage, costs, tool executions, file changes, and other metrics for monitoring agent performance and providing audit trails.
Structs§
- Context
Limit - Context limit tracking
- Cost
Estimate - Cost calculation utilities
- File
Change - A single file change record
- Stage
Telemetry - Per-stage telemetry
- Swarm
Telemetry Collector - Telemetry collector for swarm operations
- Swarm
Telemetry Metrics - Metrics collected during swarm execution
- Telemetry
Data - Persistent telemetry data that can be saved/loaded from disk
- Telemetry
Stats - Aggregated statistics for persistence
- Token
Counts - Token counts for a single request/operation
- Token
Stats - Statistics for token usage
- Token
Usage Registry - Tracks usage by model, by operation type, and provides aggregation
- Token
Usage Snapshot - Immutable snapshot of token usage state
- Token
Usage Tracker - Thread-safe token usage tracker for a single model or operation type
- Tool
Execution - A single tool execution record
- Tool
Execution Stats - Statistics about tool executions
- Tool
Execution Tracker - Thread-safe tool execution tracker
Enums§
- File
Change Type - Type of file change
- Privacy
Level - Privacy level for telemetry data
Statics§
- PERSISTENT_
TELEMETRY - Global persistent telemetry (loaded on first access, saved on record)
- TOKEN_
USAGE - Global token usage registry
- TOOL_
EXECUTIONS - Global tool execution tracker
Functions§
- get_
persistent_ stats - Get a snapshot of persistent telemetry
- record_
persistent - Record an execution to persistent telemetry
Type Aliases§
- SubAgent
Exec Id - Unique identifier for a sub-agent execution
- Swarm
Exec Id - Unique identifier for a swarm execution
- Tool
Exec Id - Unique identifier for a tool execution