Answer: You control metrics cardinality in Claude Code OpenTelemetry using environment variables that determine which attributes are included in metrics and events. These include OTEL_METRICS_INCLUDE_SESSION_ID, OTEL_METRICS_INCLUDE_VERSION, OTEL_METRICS_INCLUDE_ACCOUNT_UUID, OTEL_METRICS_INCLUDE_ENTRYPOINT, OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES, and OTEL_METRICS_INCLUDE_REPOSITORY. Status: Check failed Entry: tool/claude-code/admin-and-enterprise/metrics-cardinality-control Revision: 3 Digest: sha256:4aacc2e8dbf0aaa6 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:46Z Last changed: 2026-11-19T12:17:51Z Last verified: 2026-11-19T12:17:51Z Last attempt: 2026-11-20T12:22:22Z (failed) Next check: 2026-11-20T13:22:22Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Session ID variable | OTEL_METRICS_INCLUDE_SESSION_ID | [1] | 2026-11-19 Session ID default | true | [1] | 2026-11-19 Version variable | OTEL_METRICS_INCLUDE_VERSION | [1] | 2026-11-19 Version default | false | [1] | 2026-11-19 Account UUID variable | OTEL_METRICS_INCLUDE_ACCOUNT_UUID | [1] | 2026-11-19 Entrypoint variable | OTEL_METRICS_INCLUDE_ENTRYPOINT | [1] | 2026-11-19 Resource attributes variable | OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES | [1] | 2026-11-19 Repository variable | OTEL_METRICS_INCLUDE_REPOSITORY | [1] | 2026-11-19 Sources: [1] Anthropic. "Monitoring". https://code.claude.com/docs/en/monitoring-usage.md Role: primary. Accessed: 2026-11-19T12:17:51Z Quote: "`OTEL_METRICS_INCLUDE_SESSION_ID` | Include session.id and cloud sessions' ccr.session.id attributes in metrics and events" (Supports: Session ID variable) Quote: "Include session.id and cloud sessions' ccr.session.id attributes in metrics and events | `true`" (Supports: Session ID default) Quote: "`OTEL_METRICS_INCLUDE_VERSION` | Include app.version attribute in metrics and events" (Supports: Version variable) Quote: "Include app.version attribute in metrics and events | `false`" (Supports: Version default) Quote: "`OTEL_METRICS_INCLUDE_ACCOUNT_UUID` | Include user.account\_uuid and user.account\_id attributes in metrics and events" (Supports: Account UUID variable) Quote: "`OTEL_METRICS_INCLUDE_ENTRYPOINT` | Include app.entrypoint attribute in metrics and events" (Supports: Entrypoint variable) Quote: "`OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES` | Include keys from `OTEL_RESOURCE_ATTRIBUTES` as attributes on metric datapoints and events" (Supports: Resource attributes variable) Quote: "`OTEL_METRICS_INCLUDE_REPOSITORY` | Include `vcs.*` [repository identity attributes](#repository-attributes) on metrics and events. Requires Claude Code v2.1.269 or later" (Supports: Repository variable) Published: 2026-11-19T03:41:05Z Snapshot SHA-256: 43424218bd573d431c0a3632928201d1b8320bb44b5b033d8d5ac4627817538f (captured 2026-11-19T12:17:49Z) 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-19T12:17:51Z. No independent second source is configured for this entry Last successful check: 2026-11-19T12:17:51Z Last attempt: 2026-11-20T12:22:22Z (failed) Notes and limitations: Extracted automatically from a single official source (section "Metrics cardinality control"). Related: https://latestn.com/tool/claude-code/admin-and-enterprise/multi-tenant-isolation How do I isolate tenants when hosting the Claude Code Agent SDK for multiple customers? https://latestn.com/tool/claude-code/admin-and-enterprise/network-access-hipaa What network access does Claude Code need in a HIPAA configuration? https://latestn.com/tool/claude-code/admin-and-enterprise/network-settings-background-agents How do I apply proxy and network settings to Claude Code background agents? https://latestn.com/tool/claude-code/admin-and-enterprise/managed-permission-settings How do I enforce Claude Code permission rules across my organization with managed settings? https://latestn.com/tool/claude-code/admin-and-enterprise/managed-settings-delivery-mechanisms Which delivery mechanisms can I use to distribute Claude Code managed settings per OS? https://latestn.com/tool/claude-code/admin-and-enterprise/managed-settings-example What does an organization's managed-settings.json for Claude Code look like? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:22:22Z | check-failed | Extraction did not pass verification: answer does not contain any extracted value | — 2026-11-19T12:17:51Z | recovered | Check succeeded again | — 2026-11-19T12:17:51Z | changed | Repository variable: — → OTEL_METRICS_INCLUDE_REPOSITORY | [1] 2026-11-19T12:17:51Z | changed | Resource attributes variable: — → OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES | [1] 2026-11-19T12:17:51Z | changed | Entrypoint variable: — → OTEL_METRICS_INCLUDE_ENTRYPOINT | [1] 2026-11-19T12:17:51Z | changed | Account UUID variable: — → OTEL_METRICS_INCLUDE_ACCOUNT_UUID | [1] 2026-11-19T12:17:51Z | changed | Version default: — → false | [1] 2026-11-19T12:17:51Z | changed | Version variable: — → OTEL_METRICS_INCLUDE_VERSION | [1] 2026-11-19T12:17:51Z | changed | Session ID default: — → true | [1] 2026-11-19T12:17:51Z | changed | Session ID variable: — → OTEL_METRICS_INCLUDE_SESSION_ID | [1] 2026-11-19T12:17:51Z | changed | repository variable: OTEL_METRICS_INCLUDE_REPOSITORY → — | [1] 2026-11-19T12:17:51Z | changed | resource attributes variable: OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES → — | [1] 2026-11-19T12:17:51Z | changed | entrypoint variable: OTEL_METRICS_INCLUDE_ENTRYPOINT → — | [1] 2026-11-19T12:17:51Z | changed | account UUID variable: OTEL_METRICS_INCLUDE_ACCOUNT_UUID → — | [1] 2026-11-19T12:17:51Z | changed | version default: false → — | [1] 2026-11-19T12:17:51Z | changed | version variable: OTEL_METRICS_INCLUDE_VERSION → — | [1] 2026-11-19T12:17:51Z | changed | session ID default: true → — | [1] 2026-11-19T12:17:51Z | changed | session ID variable: OTEL_METRICS_INCLUDE_SESSION_ID → — | [1] 2026-11-15T12:22:30Z | check-failed | Extraction did not pass verification: answer does not contain any extracted value | — 2026-11-14T12:18:07Z | changed | repository variable: — → OTEL_METRICS_INCLUDE_REPOSITORY | [1] 2026-11-14T12:18:07Z | changed | resource attributes variable: — → OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES | [1] 2026-11-14T12:18:07Z | changed | entrypoint variable: — → OTEL_METRICS_INCLUDE_ENTRYPOINT | [1] 2026-11-14T12:18:07Z | changed | account UUID variable: — → OTEL_METRICS_INCLUDE_ACCOUNT_UUID | [1] 2026-11-14T12:18:07Z | changed | version default: — → false | [1] 2026-11-14T12:18:07Z | changed | version variable: — → OTEL_METRICS_INCLUDE_VERSION | [1] 2026-11-14T12:18:07Z | changed | session ID default: — → true | [1] 2026-11-14T12:18:07Z | changed | session ID variable: — → OTEL_METRICS_INCLUDE_SESSION_ID | [1] 2026-11-14T12:18:07Z | changed | Repository variable: OTEL_METRICS_INCLUDE_REPOSITORY → — | [1] 2026-11-14T12:18:07Z | changed | Resource attributes variable: OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES → — | [1] 2026-11-14T12:18:07Z | changed | Entrypoint variable: OTEL_METRICS_INCLUDE_ENTRYPOINT → — | [1] 2026-11-14T12:18:07Z | changed | Account UUID variable: OTEL_METRICS_INCLUDE_ACCOUNT_UUID → — | [1] 2026-11-14T12:18:07Z | changed | Version default: false → — | [1] 2026-11-14T12:18:07Z | changed | Version variable: OTEL_METRICS_INCLUDE_VERSION → — | [1] 2026-11-14T12:18:07Z | changed | Session ID default: true → — | [1] 2026-11-14T12:18:07Z | changed | Session ID variable: OTEL_METRICS_INCLUDE_SESSION_ID → — | [1] 2026-11-13T03:04:46Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/metrics-cardinality-control/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/metrics-cardinality-control POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/metrics-cardinality-control with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/metrics-cardinality-control?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I control metrics cardinality in Claude Code OpenTelemetry? Revision 3, last verified 2026-11-19T12:17:51Z. https://latestn.com/tool/claude-code/admin-and-enterprise/metrics-cardinality-control (accessed 2026-11-21T10:02:11Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_metrics_cardinality_control_r3, title = {How do I control metrics cardinality in Claude Code OpenTelemetry?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/metrics-cardinality-control}}, note = {Revision 3; digest sha256:4aacc2e8dbf0aaa6; last verified 2026-11-19T12:17:51Z; accessed 2026-11-21T10:02:11Z} } 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/metrics-cardinality-control