Claude Code Metrics
Metrics groundcover collects from Claude Code.
The metrics groundcover collects from Claude Code via its built-in OpenTelemetry export. Each metric is listed under its exact name: search or query by that name, or link directly to its anchor.
Anthropic's monitoring reference documents these metrics with OTel dot names (for example claude_code.token.usage); groundcover stores them in the Prometheus form shown here (dots become underscores, with the unit and _total suffixes appended).
Labels are the dimensions you can slice these metrics by. Every metric carries the standard set: session_id, organization_id, user_id, user_email, user_account_id, user_account_uuid, service_name, service_version (the Claude Code version), os_type, os_version, host_arch, terminal_type, claude_deployment_mode. Metrics with additional labels:
type
Breakdown dimension
token usage (token type), lines of code, active time
input, output, cacheRead, cacheCreation / added, removed
model
Model that served the request
token usage, cost
claude-sonnet-4-6
query_source
Where the request originated
token usage, cost
agent_name, skill_name, plugin_name, mcp_server_name, mcp_tool_name, effort
Active subagent / skill / plugin / MCP context when applicable
token usage, cost
start_type
How the session started
session count
fresh, resume, continue
decision
Permission decision
code-edit-tool decisions
accept, reject
tool_name
Editing tool the decision applies to
code-edit-tool decisions
Edit, Write, NotebookEdit
language
Language of the edited file
code-edit-tool decisions
source
What triggered the decision
code-edit-tool decisions
claude_code_session_count_total
Count of CLI sessions started
Unit: Number · Type: Counter
claude_code_lines_of_code_count_total
Count of lines of code modified
Unit: Number · Type: Counter
claude_code_pull_request_count_total
Number of pull requests created
Unit: Number · Type: Counter
claude_code_commit_count_total
Number of git commits created
Unit: Number · Type: Counter
claude_code_cost_usage_USD_total
Cost of the Claude Code session
Unit: $ · Type: Counter
claude_code_token_usage_tokens_total
Number of tokens used
Unit: Number · Type: Counter
claude_code_code_edit_tool_decision_total
Count of code editing tool permission decisions
Unit: Number · Type: Counter
claude_code_active_time_seconds_total
Total active time in seconds
Unit: Seconds · Type: Counter
Last updated
