For the complete documentation index, see llms.txt. This page is also available as Markdown.

Anthropic Claude Code Telemetry (Beta)

Monitor Claude Code usage, cost, and tool activity via OpenTelemetry (OTLP)

Overview

Claude Code Telemetry log ingestion is in open beta starting with Panther version 1.127 and is available to all customers. Please share any bug reports and feature requests with your Panther support team.

Claude Code is Anthropic's agentic command-line coding tool. When telemetry is enabled, it exports usage data through OpenTelemetry (OTel), including sessions, token and cost usage, tool activity, permission decisions, and API/auth events.

Panther ingests Claude Code's OTLP log events in real time, normalizes them through the Anthropic.ClaudeTelemetry schema, and enables security and platform teams to monitor adoption, spend, and risky activity across their developer fleet.

Prerequisites

  • Claude Code installed and configured.

  • Administrator access to your Claude Code organization (to deploy managed settings).

How to onboard Claude Code telemetry to Panther

Step 1: Create an OTLP log source in Panther

  1. In the left-hand navigation bar of your Panther Console, click Log Sources.

  2. Click Create New.

  3. Search for "Claude Code" and click its tile.

  4. On the Configure page, provide:

    • Source Name: Enter a descriptive name like Claude Code Telemetry.

    • Schemas: The Anthropic.ClaudeTelemetry schema will be automatically selected.

  5. In the Authentication section:

    • Auth method: Bearer (pre-selected for OTLP sources).

    • Bearer Token: Generate and securely copy the bearer token value.

  6. Click Setup.

  7. Note the OTLP Endpoint URL from the success screen — you'll need this for Claude Code configuration.

Step 2: Configure Claude Code telemetry via managed settings

The recommended way to enable Claude Code telemetry across your developer fleet is through the Claude Code managed settings file. As an administrator, navigate to Organization Settings > Claude Code > Managed settings in your Claude organization and deploy a configuration like the following:

Replace <your_panther_otlp_endpoint_url> and <your_bearer_token> with the values from Step 1.

Managed settings are pushed centrally to every Claude Code installation in your organization, giving you a single, auditable place to control telemetry. See Claude Code settings precedence for how managed settings interact with user-level configuration.

Alternative: per-user environment variables

For local testing or installations not yet covered by managed settings, the same configuration can be applied as shell environment variables:

Privacy controls

Claude Code provides granular privacy controls. Set these in the same env block (managed settings) or as environment variables:

  • OTEL_LOG_USER_PROMPTS=1: Includes actual prompt content in telemetry (redacted by default).

  • OTEL_LOG_TOOL_DETAILS=1: Includes detailed tool parameters, hook configurations, and error details.

  • OTEL_LOG_RAW_API_BODIES=file:<directory>: Logs full API request/response bodies to files in the given directory.

Step 3: Test the integration

  1. From a machine that has received the managed settings (or your local shell with the env vars set), run Claude Code:

  2. In the Panther Console, navigate to your Claude Code log source and verify:

    • Source Status shows as "Healthy".

    • Recent events appear in the Events section.

    • Event processing is working correctly.

Supported log types

Anthropic.ClaudeTelemetry

Last updated

Was this helpful?