autotel
Reviewed
at commit 615995a
Sends data to The OpenTelemetry collector you set in OTEL_EXPORTER_OTLP_ENDPOINT
OpenTelemetry for mods: adds $.autotel in the engine.create fold and traces every hook dispatch.
0 upvotes
Log in to upvote or save- Made by
- Jag Reehal
- Pinned commit
-
615995a2a6d2ff173f806e5e4f90cb21cfad0540 - What we checked
-
Times every prompt, turn, tool call, permission check and plugin hook, shows each finished tool call's duration on its row, and gives other plugins a way to record their own timings. Only when OTEL_EXPORTER_OTLP_ENDPOINT is set does it send these timings to that address; it sends event, tool and plugin names, ids and error messages, not your prompt text, tool inputs or file contents. Nothing is saved.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 4b9125f; the rest carries over from the review at that commit. register.ts registers engine.create (adds the $.autotel span noun), session.start (reads OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_HEADERS through $.env.get and $.session.id; without an endpoint the recorder stays inert and nothing is sent), a '*' hook that wraps a fixed list of dispatches (prompt.submit, turn.*, tool.call, tool.check, mcp.call, model.*, process.run, http.fetch, fs.read, fs.write, command.run, agent.spawn, session.*, plugin.register, ui.press and every classic.* shell hook) and always passes the call and result through unchanged, skipping its own plugin's calls, and ui.render for the ToolUse component, which appends a dim duration badge via $.ui.resolve. Spans carry the event name, originating plugin and tier, tool name, tool_use_id, agent and turn ids, turn end reason, per-hook outcome, tier, duration and reason from next.trace, a prompt's drop reason and thrown error messages; no prompt text, tool inputs or outputs are recorded. otlp.ts batches spans in memory (1 s timer via $.clock.after, at most 1000 queued) and POSTs OTLP/JSON with $.http.fetch to <endpoint>/v1/traces with the parsed OTLP headers, one attempt per batch, failures swallowed; it flushes at turn end and SessionEnd. The endpoint and its auth headers come only from the user's environment; the plugin targets the loopback autotel-devtools collector but will also post to any collector the standard OTEL_EXPORTER_OTLP_ENDPOINT variable already points at. No files, programs, model calls or persistent storage. The types folder holds TypeScript declarations only and is not executed. Changes in this version: package.json version 0.1.1 to 0.1.2 and a vitest dev-dependency bump, plus a changelog entry; no code changes.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: no
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: no
- Shows something on screen: yes
- Hooked events
OpenTelemetry for Claude Code plugins: adds $.autotel in the engine.create fold so a plugin records spans, traces every hook dispatch with the chain beneath it, and shows each tool call's settled duration on its row. Exports OTLP/HTTP to OTEL_EXPORTER_OTLP_ENDPOINT (autotel-devtools claude sets it).
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/autotel/)