원클릭으로
otel
Claude Code OTEL telemetry format documentation. Use when working with OTEL span interception, enrichment, or correlation in BikeRack GUI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Claude Code OTEL telemetry format documentation. Use when working with OTEL span interception, enrichment, or correlation in BikeRack GUI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | otel |
| description | Claude Code OTEL telemetry format documentation. Use when working with OTEL span interception, enrichment, or correlation in BikeRack GUI. |
| allowed_tools | ["Read","Glob","Grep","Task"] |
Enable OTEL debug logging and inspect telemetry data to understand span structure, attributes, and correlation patterns.
Enriched span data with tool metadata, file information, and correlation IDs for UI visualization and telemetry analysis.
Document the actual OTEL data Claude Code emits. This is ground truth, not speculation.
WARNING: Do NOT assume fields exist. Check this document first.
# Option 1: Via environment variable
OTEL_DEBUG=true npm run dev
# Option 2: Runtime toggle (in code or devtools)
import { setOtelDebug } from './otlp-receiver.js';
setOtelDebug(true);
Captures go to:
[OTEL-CAPTURE] prefix/tmp/otel-capture.jsonlView captures:
cat /tmp/otel-capture.jsonl | jq .
# Or tail live:
tail -f /tmp/otel-capture.jsonl | jq .
WORKING - Stories 36-9, 36-10, 36-2, and 36-3 have established working enrichment patterns.
Claude Code exports OTEL logs (not traces/spans). The logRecord structure:
interface LogRecord {
timeUnixNano: string; // Nanoseconds since epoch
observedTimeUnixNano: string;
body: { stringValue: string }; // Event name (e.g., "claude_code.tool_result")
attributes: Attribute[]; // Key-value pairs
droppedAttributesCount: number;
// NOTE: traceId and spanId are NOT present at logRecord level
}
traceId - NOT in logRecord (Story 36-9 confirmed)spanId - NOT in logRecord (Story 36-9 confirmed)tool_use_id - NOT in OTEL attributes; use Claude message stream block.id instead| Event Name | Description |
|---|---|
claude_code.tool_result | Tool execution completed |
claude_code.user_prompt | User prompt submitted |
claude_code.api_request | API request made |
tool_name: string // e.g., "Read", "Edit", "Bash"
tool_parameters: string // JSON string with tool-specific input
tool_output: string // Tool output (truncated to ~2000 chars)
duration_ms: string|number // Execution time in milliseconds
success: string // "true" or "false" as string
error?: string // Error message if failed
Read:
{ "file_path": "/absolute/path/to/file.ts" }
Edit:
{
"file_path": "/absolute/path/to/file.ts",
"old_string": "text to replace",
"new_string": "replacement text"
}
Bash:
{
"command": "git status",
"description": "Check git status",
"timeout": 120000,
"run_in_background": false
}
Story 36-10 solved the correlation problem:
tool_use with block.id, block.name, block.inputstorePendingToolInput(toolId, toolName, input)consumePendingToolInput(toolName, parsedToolParams)file_path first for precise correlationblock.id (toolId) as synthetic spanId for correlation mapWhy this works:
Claude Message Stream OTEL Logs
| |
tool_use event tool_result event
| |
storePendingToolInput() consumePendingToolInput()
| |
+-----> Correlation <---------+
|
enrichXxxSpan()
|
ToolEvent with metadata
|
Broadcast to UI
| Tool | Enrichment Function | Data Added |
|---|---|---|
| Read | enrichReadSpan() | fileSize, lineCount, language, gitStatus |
| Edit | enrichEditSpan() | fileSize, language, gitStatus, diff (added/removed) |
| Bash | enrichBashSpan() | command (redacted), exitCode, outputSummary, workingDirectory |
Commands are redacted before storage:
password=xxx → password=[REDACTED]token=xxx → token=[REDACTED]AWS_SECRET_ACCESS_KEY=[REDACTED][REDACTED][REDACTED]| File | Purpose |
|---|---|
packages/cyclist/src/otlp-receiver.ts | OTEL parsing, enrichment integration |
packages/cyclist/src/span-correlation.ts | Pending tool input queue, correlation map |
packages/cyclist/src/file-enrichment.ts | Enrichment functions (Read, Edit, Bash) |
packages/cyclist/src/main.ts:820-824 | Message stream tool_use capture |
// Enable/disable debug at runtime
import { setOtelDebug, isOtelDebugEnabled } from './otlp-receiver.js';
setOtelDebug(true); // Start capturing
setOtelDebug(false); // Stop capturing
isOtelDebugEnabled(); // Check status
// Enrichment functions
import { enrichReadSpan, enrichEditSpan, enrichBashSpan } from './file-enrichment.js';
// Correlation
import { storePendingToolInput, consumePendingToolInput } from './span-correlation.js';
Each line in /tmp/otel-capture.jsonl contains:
{
"timestamp": "2026-01-15T08:00:00.000Z",
"eventName": "claude_code.tool_result",
"logRecordKeys": ["timeUnixNano", "body", "attributes", ...],
"traceId": null,
"spanId": null,
"attributes": [
{ "key": "tool_name", "value": { "stringValue": "Read" } },
...
]
}
| Story | Title | Status |
|---|---|---|
| 36-1 | OTEL span interception and correlation | DONE |
| 36-2 | Read/Edit tool enrichment | DONE |
| 36-3 | Bash tool enrichment | DONE |
| 36-4 | Search tool enrichment (Grep/Glob) | Backlog |
| 36-5 | Task/subagent enrichment | Backlog |
| 36-9 | Bug: missing trace/span IDs | DONE |
| 36-10 | Bug: race condition in correlation | DONE |
Interactive playtest — full-stack (UI + Playwright + UX Designer) or headless (API-only + Python driver). Coordinates cross-workspace bug reporting via ping-pong file with FIXER.
LLM cost and cache forensics — reconcile server-log narrator costs against the Anthropic Admin API, attribute per-model spend, detect dead caching and invisible callers. Use when analyzing API costs, auditing cache efficiency, or when the Console bill doesn't match expectations.
Create epic or story context documents. Reads sprint YAML for epic/story data, reads context-schema.yaml for required sections, populates templates, and writes output to sprint/context/. Epic context is a single-agent operation (no tandem). Story context uses PM + tandem partner for domain-specific observations.
Jira CLI commands for sprint management. Use when viewing, assigning, or updating Jira issues from the command line.
Sprint status, backlog, and story management for Pennyfarthing. Use when checking current sprint status, finding available stories, reviewing backlog, or understanding story context and history. IMPORTANT: Always use `pf sprint` CLI commands - never manually edit sprint YAML.
List available workflows, show current workflow details, and switch workflows mid-session. Use when checking available workflow types (TDD, trivial, agent-docs), viewing current workflow phase, switching to a different workflow pattern, or managing BikeLane stepped workflows.