Claude Agent SDK OpenTelemetry Observability Capability Pack Skill
Expert capability pack for Agent SDK OpenTelemetry export using CLAUDE_CODE_ENABLE_TELEMETRY, OTLP exporters, and monitoring-usage reference variables documented for Claude Code CLI subprocesses.
Open the source and read safety notes before installing.
Safety notes
- OTEL_LOG_* opt-ins can export prompts and tool payloads—enable only with approved pipelines.
- Do not use console exporter through the SDK per observability doc warning.
Privacy notes
- Default telemetry is structural; opt-in variables add user content to exports.
Prerequisites
- Agent SDK query() deployment with access to environment or options.env.
- OTLP collector reachable from the host running the SDK.
Schema details
- Install type
- package
- Reading time
- 9 min
- Difficulty score
- 76
- Troubleshooting
- Yes
- Breaking changes
- No
- Scope
- Source repo
- Skill type
- capability-pack
- Skill level
- expert
- Verification
- validated
- Verified at
- 2026-06-16
| Platform | Support | Install path |
|---|---|---|
| claude-code | Native | .claude/skills/<skill-name>/SKILL.md |
| codex | Native | .agents/skills/<skill-name>/SKILL.md |
| windsurf | Native | .windsurf/skills/<skill-name>/SKILL.md |
| gemini | Native | .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md |
| cursor | Adapter | .cursor/rules/<skill-name>.mdc |
| cli | Manual | AGENTS.md or tool-specific context file |
Full copyable content
# Trigger
"Apply the Claude Agent SDK OpenTelemetry observability capability pack."
# Required output
1) Signal plan (metrics, logs, traces beta)
2) Documented env var checklist
3) OTLP endpoint review
4) Sensitive export opt-in decision
5) Privacy-safe summaryAbout this resource
Knowledge Freshness
Grounded in agent-sdk/observability and monitoring-usage docs verified 2026-06-16. Tracing remains beta—confirm live docs before dashboard dependencies.
Retrieval Sources
- https://code.claude.com/docs/en/agent-sdk/observability
- https://code.claude.com/docs/en/monitoring-usage
- https://code.claude.com/docs/en/agent-sdk/overview
- https://github.com/anthropics/claude-code
- https://developers.google.com/search/docs/fundamentals/creating-helpful-content
Source Verification Notes
Verified on 2026-06-16:
| Signal | Enable with | Doc page |
|---|---|---|
| All telemetry | CLAUDE_CODE_ENABLE_TELEMETRY=1 | Observability |
| Metrics | OTEL_METRICS_EXPORTER=otlp | Observability |
| Log events | OTEL_LOGS_EXPORTER=otlp | Observability |
| Traces (beta) | OTEL_TRACES_EXPORTER=otlp + CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 | Observability |
| Span names | claude_code.interaction, claude_code.llm_request, claude_code.tool | Observability |
Monitoring-usage cross-links additional CLI telemetry variables and security guidance.
Scope Note
Community review skill applying documented environment variables for Agent SDK hosts running the Claude Code CLI subprocess—not an Anthropic productized skill pack.
Core Workflow
- Pick signals needed (metrics, logs, traces beta).
- Set CLAUDE_CODE_ENABLE_TELEMETRY=1 and per-signal OTEL_*_EXPORTER values.
- Configure OTEL_EXPORTER_OTLP_* for the collector.
- Pass env via deployment shell or options.env (spread process.env in TypeScript).
- Review OTEL_LOG_* opt-ins with security stakeholders.
- Publish privacy-safe observability summary.
Capability Scope
- SDK OTLP enablement checklist.
- Trace span naming awareness.
- Sensitive export opt-in review.
- Short-lived process export interval tuning.
Production Rules
- Never commit OTLP bearer tokens.
- Keep OTEL_LOG_* unset unless approved.
- Avoid console exporter values in SDK runs.
Review Matrix
| Check | Pass | Doc |
|---|---|---|
| Enabled | CLAUDE_CODE_ENABLE_TELEMETRY=1 | Observability |
| Traces beta | ENHANCED_TELEMETRY_BETA set | Observability |
| OTLP | endpoint + protocol configured | Observability |
| Sensitive | OTEL_LOG_* justified | Observability |
Output Contract
- Signal plan.
- Env checklist.
- OTLP review.
- Sensitive opt-in log.
- Privacy-safe summary.
Duplicate Check
Distinct from opentelemetry-trace-analysis-agent and claude-code-analytics-adoption-capability-pack.
Editorial Disclosure
Independent entry by kiannidev from public Agent SDK observability and monitoring-usage docs.
Source citations
Add this badge to your README
Show that Claude Agent SDK OpenTelemetry Observability Capability Pack Skill is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/skills/claude-agent-sdk-opentelemetry-observability-capability-pack)How it compares
Claude Agent SDK OpenTelemetry Observability Capability Pack Skill side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Claude Agent SDK OpenTelemetry Observability Capability Pack Skill Expert capability pack for Agent SDK OpenTelemetry export using CLAUDE_CODE_ENABLE_TELEMETRY, OTLP exporters, and monitoring-usage reference variables documented for Claude Code CLI subprocesses. Open dossier | Claude Agent SDK Custom Tool Authoring Capability Pack Skill Expert Claude Agent SDK custom tool authoring capability pack for designing typed in-process tools with createSdkMcpServer, allowedTools scoping, isError handling, and privacy-safe rollout checklists aligned to official custom-tools documentation. Open dossier | Claude Agent SDK MCP Integration Capability Pack Skill Expert Claude Agent SDK MCP integration capability pack for designing, reviewing, and rolling out Agent SDK MCP integration with source-backed checklists, production rules, and privacy-safe output contracts. Open dossier | Claude Agent SDK Session Storage Capability Pack Skill Expert Claude Agent SDK session storage capability pack for designing, reviewing, and rolling out Agent SDK session storage with source-backed checklists, production rules, and privacy-safe output contracts. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | skills | skills | skills | skills |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | kiannidev | kiannidev | kiannidev | kiannidev |
| Added | 2026-06-16 | 2026-06-16 | 2026-06-14 | 2026-06-14 |
| Platforms | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI | Claude CodeCodexWindsurfGeminiCursorCLI |
| Source repo | — | — | — | — |
| Safety notes | ✓OTEL_LOG_* opt-ins can export prompts and tool payloads—enable only with approved pipelines. Do not use console exporter through the SDK per observability doc warning. | ✓Tool descriptions and annotations are hints, not enforcement—validate destructive inputs in handlers. Wildcard mcp__server__* allowlists expand blast radius; prefer per-tool grants in production. Throwing from a handler stops the query; return isError for recoverable failures per custom-tools docs. In-process tools run inside your application whenever Claude calls them; gate writes explicitly. | ✓This skill plans Agent SDK MCP integration; it must not execute destructive changes without explicit approval. Browser, computer-use, and remote surfaces can access sensitive UI state; scope tests carefully. MCP and SDK integrations may exfiltrate data if tool scopes are too broad. The public `anthropics/claude-code` repository ships documentation links to code.claude.com for settings, security, and integration surfaces. Scheduled or autonomous workflows compound risk; cap blast radius in staging first. | ✓This skill plans Agent SDK session storage; it must not execute destructive changes without explicit approval. Browser, computer-use, and remote surfaces can access sensitive UI state; scope tests carefully. MCP and SDK integrations may exfiltrate data if tool scopes are too broad. The public `anthropics/claude-code` repository ships documentation links to code.claude.com for settings, security, and integration surfaces. Scheduled or autonomous workflows compound risk; cap blast radius in staging first. |
| Privacy notes | ✓Default telemetry is structural; opt-in variables add user content to exports. | ✓Tool schemas, inputs, and results enter model context each turn—never embed secrets in descriptions. Large tool sets increase context usage; defer rarely used tools via tool search when scaling. Structured outputs and logs may reach host telemetry—redact customer identifiers at handler boundaries. External APIs invoked by handlers may log request metadata governed by vendor retention policies. | ✓Reviews may expose integration tokens, customer metadata, and internal URLs related to Agent SDK MCP integration. Telemetry and analytics configs can include account emails; redact before sharing externally. Keep troubleshooting logs in internal channels unless explicitly sanitized. Third-party vendors remain outside Anthropic retention policies; document separately. | ✓Reviews may expose integration tokens, customer metadata, and internal URLs related to Agent SDK session storage. Telemetry and analytics configs can include account emails; redact before sharing externally. Keep troubleshooting logs in internal channels unless explicitly sanitized. Third-party vendors remain outside Anthropic retention policies; document separately. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | — | — | — | — |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.