Answer: Claude Code exports eight metrics (session count, lines of code count, pull request count, commit count, cost usage, token usage, code edit tool decision, and active time total) and a set of events via OpenTelemetry logs/events, including user_prompt, assistant_response, tool_result, api_request, api_error, api_refusal, api_request_body, api_response_body, tool_decision, permission_mode_changed, auth, and mcp_server_connection. Status: Confirmed Entry: tool/claude-code/admin-and-enterprise/available-metrics-events Revision: 6 Digest: sha256:5b5d913173f1b684 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:46Z Last changed: 2026-11-20T12:22:21Z (event - tool decision: — → claude_code.tool_decision) Last verified: 2026-11-20T12:22:21Z Next check: 2026-11-21T12:22:21Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of metrics | claude_code.session.count | | [1] | 2026-11-20 metric - lines of code | claude_code.lines_of_code.count | | [1] | 2026-11-20 metric - cost | claude_code.cost.usage | USD | [1] | 2026-11-20 metric - token usage | claude_code.token.usage | tokens | [1] | 2026-11-20 metric - active time | claude_code.active_time.total | s | [1] | 2026-11-20 events | Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured): | | [1] | 2026-11-20 event - user prompt | claude_code.user_prompt | | [1] | 2026-11-20 event - tool decision | claude_code.tool_decision | | [1] | 2026-11-20 Sources: [1] Anthropic. "Monitoring". https://code.claude.com/docs/en/monitoring-usage.md Role: primary. Accessed: 2026-11-20T12:22:21Z Quote: "Claude Code exports the following metrics. The Unit column shows the OpenTelemetry unit string attached to each metric; count metrics carry none. | Metric Name | Description | Unit | | - | - | - | | `claude_code.session.count" (Supports: metrics) Quote: "| `claude_code.lines_of_code.count` | Count of lines of code modified | none |" (Supports: metric - lines of code) Quote: "| `claude_code.cost.usage` | Cost of the Claude Code session | USD |" (Supports: metric - cost) Quote: "| `claude_code.token.usage` | Number of tokens used | tokens |" (Supports: metric - token usage) Quote: "| `claude_code.active_time.total` | Total active time | s |" (Supports: metric - active time) Quote: "Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured):" (Supports: events) Quote: "**Event Name**: `claude_code.user_prompt`" (Supports: event - user prompt) Quote: "**Event Name**: `claude_code.tool_decision`" (Supports: event - tool decision) Published: 2026-11-20T02:52:06Z Snapshot SHA-256: 056e86720f4bca87cc4bc148f65e9e1dc42e00a76bb92d31156290cfaea220b6 (captured 2026-11-20T12:22:20Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:22:21Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:22:21Z Last attempt: 2026-11-20T12:22:21Z Notes and limitations: Extracted automatically from a single official source (section "Available metrics and events"). Only the first 60,000 characters of the page text were read. Related: https://latestn.com/tool/claude-code/admin-and-enterprise/aws-gateway-architecture What AWS infrastructure does Claude apps gateway require to deploy on ECS Fargate or EKS? https://latestn.com/tool/claude-code/admin-and-enterprise/block-code-mode-org How do I block Code Mode for my organization in Claude Code? https://latestn.com/tool/claude-code/admin-and-enterprise/choose-api-provider How do I choose which API provider Claude Code uses for my organization? https://latestn.com/tool/claude-code/admin-and-enterprise/api-customer-analytics Where can API customers view Claude Code usage and spend analytics? https://latestn.com/tool/claude-code/admin-and-enterprise/audit-plugin-installs How do I audit which plugins are installed across my organization in Claude Code? https://latestn.com/tool/claude-code/admin-and-enterprise/authenticate-from-ci How do I authenticate Claude Code from CI when testing self-hosted environments? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:22:21Z | changed | event - tool decision: — → claude_code.tool_decision | [1] 2026-11-20T12:22:21Z | changed | event - user prompt: — → claude_code.user_prompt | [1] 2026-11-20T12:22:21Z | changed | events: — → Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured): | [1] 2026-11-20T12:22:21Z | changed | metric - active time: — → claude_code.active_time.total | [1] 2026-11-20T12:22:21Z | changed | metric - token usage: — → claude_code.token.usage | [1] 2026-11-20T12:22:21Z | changed | metric - cost: — → claude_code.cost.usage | [1] 2026-11-20T12:22:21Z | changed | metric - lines of code: — → claude_code.lines_of_code.count | [1] 2026-11-20T12:22:21Z | changed | tool decision event: claude_code.tool_decision → — | [1] 2026-11-20T12:22:21Z | changed | API request event: claude_code.api_request → — | [1] 2026-11-20T12:22:21Z | changed | user prompt event: claude_code.user_prompt → — | [1] 2026-11-20T12:22:21Z | changed | events export mechanism: Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) → — | [1] 2026-11-20T12:22:21Z | changed | active time metric: claude_code.active_time.total → — | [1] 2026-11-20T12:22:21Z | changed | token metric: claude_code.token.usage → — | [1] 2026-11-20T12:22:21Z | changed | cost metric: claude_code.cost.usage → — | [1] 2026-11-19T12:17:50Z | changed | tool decision event: — → claude_code.tool_decision | [1] 2026-11-19T12:17:50Z | changed | API request event: — → claude_code.api_request | [1] 2026-11-19T12:17:50Z | changed | user prompt event: — → claude_code.user_prompt | [1] 2026-11-19T12:17:50Z | changed | events export mechanism: — → Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) | [1] 2026-11-19T12:17:50Z | changed | active time metric: — → claude_code.active_time.total | [1] 2026-11-19T12:17:50Z | changed | token metric: — → claude_code.token.usage | [1] 2026-11-19T12:17:50Z | changed | cost metric: — → claude_code.cost.usage | [1] 2026-11-19T12:17:50Z | changed | event - tool decision: claude_code.tool_decision → — | [1] 2026-11-19T12:17:50Z | changed | event - user prompt: claude_code.user_prompt → — | [1] 2026-11-19T12:17:50Z | changed | events: Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) → — | [1] 2026-11-19T12:17:50Z | changed | metric - active time: claude_code.active_time.total → — | [1] 2026-11-19T12:17:50Z | changed | metric - token usage: claude_code.token.usage → — | [1] 2026-11-19T12:17:50Z | changed | metric - cost: claude_code.cost.usage → — | [1] 2026-11-19T12:17:50Z | changed | metric - lines of code: claude_code.lines_of_code.count → — | [1] 2026-11-18T12:17:42Z | changed | event - tool decision: — → claude_code.tool_decision | [1] 2026-11-18T12:17:42Z | changed | event - user prompt: — → claude_code.user_prompt | [1] 2026-11-18T12:17:42Z | changed | events: — → Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) | [1] 2026-11-18T12:17:42Z | changed | metric - active time: — → claude_code.active_time.total | [1] 2026-11-18T12:17:42Z | changed | metric - token usage: — → claude_code.token.usage | [1] 2026-11-18T12:17:42Z | changed | metric - cost: — → claude_code.cost.usage | [1] 2026-11-18T12:17:42Z | changed | metric - lines of code: — → claude_code.lines_of_code.count | [1] 2026-11-18T12:17:42Z | changed | metric: claude_code.lines_of_code.count → — | [1] 2026-11-17T12:27:50Z | changed | event: claude_code.user_prompt → — | [1] 2026-11-17T12:27:50Z | changed | events: Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) → — | [1] 2026-11-17T12:27:50Z | changed | metric: claude_code.cost.usage → claude_code.lines_of_code.count | [1] 2026-11-15T12:22:29Z | recovered | Check succeeded again | — 2026-11-15T12:22:29Z | changed | event: — → claude_code.user_prompt | [1] 2026-11-15T12:22:29Z | changed | events: — → Claude Code exports the following events via OpenTelemetry logs/events (when `OTEL_LOGS_EXPORTER` is configured) | [1] 2026-11-15T12:22:29Z | changed | metric: — → claude_code.cost.usage | [1] 2026-11-15T12:22:29Z | changed | token metric unit: tokens → — | [1] 2026-11-15T12:22:29Z | changed | cost metric unit: USD → — | [1] 2026-11-15T12:22:29Z | changed | event list: claude_code.mcp_server_connection → — | [1] 2026-11-15T12:22:29Z | changed | metric list: claude_code.active_time.total → — | [1] 2026-11-14T12:18:06Z | check-failed | Extraction did not pass verification: answer does not contain any extracted value | — 2026-11-13T03:04:46Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/available-metrics-events/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/available-metrics-events POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/available-metrics-events with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/available-metrics-events?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What metrics and events does Claude Code export via OpenTelemetry? Revision 6, last verified 2026-11-20T12:22:21Z. https://latestn.com/tool/claude-code/admin-and-enterprise/available-metrics-events (accessed 2026-11-21T10:03:48Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_available_metrics_events_r6, title = {What metrics and events does Claude Code export via OpenTelemetry?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/available-metrics-events}}, note = {Revision 6; digest sha256:5b5d913173f1b684; last verified 2026-11-20T12:22:21Z; accessed 2026-11-21T10:03:48Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/admin-and-enterprise/available-metrics-events