Expert OpenTelemetry guidance for collector configuration, pipeline design, and production telemetry instrumentation across Kubernetes, ECS, serverless, and standalone deployments. Use when configuring collectors, designing pipelines, instrumenting applications, implementing sampling, managing cardinality, securing telemetry, writing OTTL transformations, or setting up AI coding agent observability (Claude Code, Codex, Gemini CLI, Antigravity, GitHub Copilot).
97
95%
Does it follow best practices?
Impact
98%
1.07xAverage score across 27 eval scenarios
Passed
No findings from the security scan
Phase: RED → GREEN (TDD)
Purpose: Validate that the references/ai-agents.md reference causes the skill to materially improve responses to AI coding agent observability questions.
references/ai-agents.md. Record baseline responses.Prompt:
"Set up OpenTelemetry monitoring for Claude Code to track token usage and costs"
CLAUDE_CODE_ENABLE_TELEMETRY=1 is required (telemetry is opt-in)OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative~/.claude/settings.json for persistent configOTEL_LOG_USER_PROMPTS, OTEL_LOG_TOOL_DETAILS)session.id as metric dimensionCLAUDE_CODE_ENABLE_TELEMETRY=1 as prerequisiteOTEL_METRICS_EXPORTER=otlp, OTEL_LOGS_EXPORTER=otlp~/.claude/settings.json as a concrete exampleOTEL_METRICS_INCLUDE_SESSION_ID=false for bounded team metricsCLAUDE_CODE_ENABLE_TELEMETRY=1settings.json examplePrompt:
"I use Claude Code, Gemini CLI with paid API keys, and Antigravity CLI. Configure an OTel Collector and explain what telemetry can be collected from each."
service.name across agentsclaude_code.* fields into gen_ai.*memory_limiter may be missing or in wrong positionmemory_limiter as first processor in every pipelineresource processor adds telemetry.source.type: ai-coding-agent without overwriting each agent's identitygen_ai.systembatch processor last before exportersmemory_limiter is first processorresource processor adds a bounded source label without overwriting agent identityPrompt:
"Which AI coding agents support OpenTelemetry? I need traces specifically for debugging multi-step agent operations."
gen_ai.* SemConvprompt.id correlation when traces are unavailablegen_ai.* fields; current docs list prompt/request/response text logging enabled by default once telemetry is enabledv1 for V1)Prompt:
"Enable Claude Code telemetry but make sure no user prompts are logged"
OTEL_LOG_USER_PROMPTS=true without warningOTEL_LOG_TOOL_DETAILS leaking tool parametersOTEL_LOG_USER_PROMPTS defaults to falseOTEL_LOG_USER_PROMPTS=false (or omits it, noting the safe default)OTEL_LOG_TOOL_DETAILS — tool parameters may contain secrets/pathscaptureContent risk if user later adopts GitHub CopilotOTEL_METRICS_INCLUDE_SESSION_ID=false (cardinality, not PII, but related)OTEL_LOG_USER_PROMPTS explicitlyOTEL_LOG_TOOL_DETAILS specificallyPrompt:
"What dashboards should I build for monitoring our team's AI coding agent usage?"
user.id or session.id as metric dimensions (cardinality risk)claude_code.token.usage and claude_code.cost.usage; queries API/tool latency from the documented event attributes rather than inventing metric namesinput/outputtool_name for Claude tool-result logs and code-edit decision metrics, rather than name or toolgen_ai.token.type is limited to only input / outputPrompt:
"I'm instrumenting an AI coding agent that calls
bashandsearch_code. Show me how the OpenTelemetry spans should be named."
gen_ai.tool.nameexecute_tool {gen_ai.tool.name} span name or fails to preserve the tool name in gen_ai.tool.nameexecute_tool {gen_ai.tool.name} span namegen_ai.tool.name on each tool spangen_ai.tool.nameexecute_tool {gen_ai.tool.name} span namegen_ai.tool.namegen_ai.tool.nameUse the Cursor task and its rubric. Verify that a Cursor-only request routes to references/ai-agents.md; inspect the response for native/hook signal boundaries and validated correlation. A passing skill-quality review is not a behavioral evaluation result.
The executable Google product-boundary scenario is google-agent-telemetry. For Node/JavaScript SDK migration requests, verify the dedicated routing row loads javascript-otel3-readiness.md and evaluate the JS readiness task. Forced-context evaluations assess answer behavior, not automatic skill selection.
Document observed agent rationalizations and counter-guidance here as they are discovered during testing.
| Rationalization | Counter |
|---|---|
| "Claude Code traces are production-stable" | Claude Code trace export is beta; validate signal shape and keep a metrics/log fallback. |
| "You can use session.id as a metric label to track per-user costs" | session.id is unbounded cardinality. Use log queries with distinct count instead. |
| "Qwen Code telemetry is still planned but not shipped" | Qwen Code ships native OTel; current docs describe selected gen_ai.* fields alongside qwen-code.*. Check its prompt-log default and validate current schema instead of relying on an old version snapshot. |
| "Codex CLI telemetry works the same in every mode" | Current Codex source exposes separate trace, metric, and log exporters; verify installed release and mode coverage independently. |
| "OpenCode's OTel plugin is built in" | The plugin is a community project. Match 2.x with OpenCode V2 and 1.x on v1 with V1; V2 no longer emits V1 session-diff lines-of-code metrics. |
| "Antigravity has native OTel because an OTel hook supports it" | Vendor callbacks require a verified OTel adapter; a workflow command does not establish compatibility. SDK tracing is a separate surface. |
| "Include the full shell command in the tool span name" | Use the Development-convention execute_tool {gen_ai.tool.name} span name and put the actual tool name in gen_ai.tool.name. |
.claude-plugin
.codex-plugin
.cursor-plugin
.github
docs
examples
references
tests