Skip to main content

Claude

Claude ships with built-in OpenTelemetry support across all of its coding surfaces: the Claude Code CLI, the desktop app, and Cowork. Once enabled, Oodle collects metrics and event logs and turns them into use-case dashboards covering adoption, cost and ROI, engineering impact, tool behavior, and efficiency across your organization.

Claude analysis dashboards

Getting Started

1. Enable Telemetry

The fastest way is to use the integration tile in the Oodle UI:

  1. Navigate to Settings → Integrations
  2. Open the AI Observability section
  3. Click the Claude Observability tile
  4. Select an API key and follow the steps shown

The tile generates a ready-to-use configuration and lets you choose how to distribute it: to a single developer, to everyone working in a repository, or to your whole organization. Replace <OTLP_ENDPOINT>, <API_KEY>, and <INSTANCE_ID> in the snippets below with values from the integration tile.

Individual

For a single developer, export the variables directly in your shell before running claude:

export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_TRACES_EXPORTER=otlp
export CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=https://<OTLP_ENDPOINT>
export OTEL_EXPORTER_OTLP_HEADERS="X-API-KEY=<API_KEY>, X-OODLE-INSTANCE=<INSTANCE_ID>"
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
export OTEL_LOG_USER_PROMPTS=1
export OTEL_LOG_TOOL_DETAILS=1

# Optional: resource attributes for team/repo breakdowns
export OTEL_RESOURCE_ATTRIBUTES="git.repository.name=my-repo,org.team.name=platform,org.department=engineering,org.cost_center=eng-123"
tip

For faster feedback during initial setup, lower the export intervals:

export OTEL_METRIC_EXPORT_INTERVAL=10000
export OTEL_LOGS_EXPORT_INTERVAL=5000

Repository

To share telemetry settings with everyone working in a repository, commit them to .claude/settings.json in the project. Claude Code applies them for anyone who works in the repo, with no per-developer setup required:

{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_TRACES_EXPORTER": "otlp",
"CLAUDE_CODE_ENHANCED_TELEMETRY_BETA": "1",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://<OTLP_ENDPOINT>",
"OTEL_EXPORTER_OTLP_HEADERS": "X-API-KEY=<API_KEY>, X-OODLE-INSTANCE=<INSTANCE_ID>",
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "delta",
"OTEL_LOG_USER_PROMPTS": "1",
"OTEL_LOG_TOOL_DETAILS": "1",
"OTEL_RESOURCE_ATTRIBUTES": "git.repository.name=my-repo,org.team.name=platform,org.department=engineering,org.cost_center=eng-123"
}
}

Server-managed (organization-wide)

To distribute settings across your whole organization without device management (MDM), use the Claude Code admin console. Paste the same env configuration into Admin Settings → Claude Code → Managed settings. Clients fetch it when users authenticate and poll for updates hourly.

  • Requires a Claude for Teams or Enterprise plan, and the Owner or Primary Owner role to edit.
  • OpenTelemetry settings take effect after a full Claude Code restart.

See the server-managed settings documentation for delivery, caching, and precedence details.

2. Verify Data

Once telemetry starts flowing (metrics export every 60 s, events every 5 s by default), navigate to AI Cost Management → Claude in the Oodle sidebar.

Dashboards

The Claude analysis page is organized around the questions engineering leadership asks of a coding agent. Each tab embeds a dashboard that leads with headline numbers, followed by trends and ranked breakdowns.

Usage and Adoption

Is the team using it?

PanelDescription
Active UsersDistinct engineers who ran Claude
SessionsSessions started, plus sessions per active user
Active TimeCLI processing time vs user interaction time
Surface / Model / Terminal MixWhere and how sessions run (CLI, desktop, Cowork; model share; editor terminals)
Version AdoptionActivity by CLI version, to track upgrade velocity
Top UsersEngineers ranked by sessions and active time

Cost and ROI

What are we paying, and what do we get for it?

PanelDescription
Total SpendEstimated USD spend, the headline budget number
Cost per Active UserAverage spend per engineer, for seat-cost modeling
Cost per Commit / Cost per PRUnit economics of shipped output
Sessions Producing OutcomesShare of sessions that led to a commit or PR
Top SpendersUsers and sessions ranked by spend
Spend BreakdownSpend by model, query source, agent, and skill
Team and Repository BreakdownSpend by org.team.name and git.repository.name resource attributes

Engineering Impact

What did it produce?

PanelDescription
Lines Added / RemovedCode throughput from accepted suggestions
Commits and Pull RequestsShipped output over time
Edit Accept RateShare of suggested edits engineers accepted, with health thresholds
Avg Lines per SessionOutput volume per session
Output LeaderboardsTop users by lines added, commits, and PRs

Tools and Automation

Is the agent working well?

PanelDescription
Tool CallsInvocation volume, distinct tools, and per-tool trends
Tool DurationAverage execution time by tool
Result SizeBytes returned per tool, the main driver of context growth and cost
Bash CLI BreakdownSpecific commands run through Bash, by count and output size
MCP Servers and ToolsExternal integration usage and latency
SkillsInvocations of codified team workflows

Efficiency

Is spend being used well?

PanelDescription
Cache Hit RateShare of context served from cache, with health thresholds
Token SplitInput vs cache read vs cache creation volume
Ghost Cost LeaderboardSessions ranked by cache re-priming relative to new input
Cost per Line of CodeOutput per dollar, overall and by model
Prompt Length AnalysisPrompt size distribution and cost per prompt

Sessions

Claude sessions table

The Sessions tab shows individual Claude sessions:

ColumnDescription
Start TimeWhen the session began
UserEmail of the developer
ModelPrimary model used
PromptsNumber of user prompts
DurationWall-clock duration
CostTotal estimated cost
ToolsNumber of tool calls
TokensTotal tokens (input + output)
ErrorsCount of errors

Click any row to open a Session Detail drawer showing a turn-by-turn timeline of every event.

Session Detail Drawer

Claude session detail drawer

The drawer displays:

  • Session metadata: user, model, app version, terminal type
  • Aggregated stats: total cost, tokens, tool calls, errors, duration
  • Turn-by-turn timeline: each turn is collapsible and shows the user prompt followed by individual events (API requests, tool calls, decisions). Every event row is expandable to reveal the full raw JSON payload.

What Gets Collected

Metrics

Claude exports the following as OpenTelemetry metrics (delta temporality):

MetricKey LabelsDescription
claude_code_token_usagetype, model, user_emailToken count by type (input, output, cacheRead, cacheCreation)
claude_code_cost_usagemodel, user_emailEstimated cost in USD
claude_code_session_countuser_emailSessions started
claude_code_active_time_totaltypeUser and CLI active time in seconds
claude_code_lines_of_code_counttypeLines added / removed
claude_code_commit_countuser_emailCommits created
claude_code_pull_request_countuser_emailPull requests created
claude_code_code_edit_tool_decisiondecisionEdit accept / reject decisions

All metrics also carry session_id, service_version, terminal_type, and job (the surface: CLI, desktop app, or Cowork). Tool call counts, durations, and result sizes are derived from the claude_code.tool_result events below and power the Tools and Automation dashboard.

Events (Logs)

Events are exported via the OpenTelemetry logs protocol. Each event has a log.attributes.event_type field:

Event TypeKey Attributes
claude_code.user_promptPrompt text (opt-in), character count
claude_code.api_requestModel, cost, input/output tokens, cache tokens, duration
claude_code.tool_resultTool name, success, duration
claude_code.tool_use_decisionDecision (accept/reject), source

Events are grouped by session_id to reconstruct the turn-by-turn timeline on the Sessions tab.

Multi-team Organization Support

Organizations with multiple teams or departments can add custom resource attributes to segment telemetry by repository, team, department, or cost center.

AttributePurposeExample
git.repository.namePer-repository breakdownsmy-service
org.team.nameTeam-level filteringplatform
org.departmentDepartment or business unitengineering
org.cost_centerCharge-back / cost allocationeng-123

Configuration

Set OTEL_RESOURCE_ATTRIBUTES as a comma-separated list of key=value pairs:

export OTEL_RESOURCE_ATTRIBUTES="git.repository.name=my-repo,org.team.name=platform,org.department=engineering,org.cost_center=eng-123"

Or add it to your managed settings file (.claude/settings.json):

{
"env": {
"OTEL_RESOURCE_ATTRIBUTES": "git.repository.name=my-repo,org.team.name=platform,org.department=engineering,org.cost_center=eng-123"
}
}
Formatting requirements

Values must not contain spaces. Use underscores, camelCase, or percent-encoding for special characters. See the Claude Code docs for the full specification.

Once set, these attributes appear on all metrics and events, allowing you to:

  • Filter dashboards by team or department
  • Track costs per cost center
  • Create per-repository usage reports
  • Set up team-specific alerts

Further Reading


Support

If you need assistance or have any questions, please reach out to us through: