autotel-devtools 27.0.0 → 27.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/dist/cli.cjs +10 -4
- package/dist/cli.js +10 -4
- package/dist/fullpage.global.js +33 -33
- package/dist/widget.global.js +14 -14
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ process. Point them at the bound port, or free the original.
|
|
|
176
176
|
- ✅ Service map visualization
|
|
177
177
|
- ✅ Resources view (derived from telemetry)
|
|
178
178
|
- ✅ GenAI run summaries + narrated walkthrough
|
|
179
|
-
- ✅ **Agents view**: observe coding agents (Claude Code, opencode)
|
|
179
|
+
- ✅ **Agents view**: observe coding agents (Claude Code, opencode), with cost split by model, effort, skill, sub-agent and prompt
|
|
180
180
|
- ✅ Global time window shared by every tab
|
|
181
181
|
- ✅ Live tail that freezes while you read, with a "N new" pill to catch up
|
|
182
182
|
- ✅ Configurable telemetry limits (env vars)
|
|
@@ -202,10 +202,11 @@ on top of the per-span detail:
|
|
|
202
202
|
|
|
203
203
|
### Agents: observe Claude Code (and other coding agents)
|
|
204
204
|
|
|
205
|
-
Coding agents like **Claude Code** emit OpenTelemetry **metrics and log events
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
Coding agents like **Claude Code** emit OpenTelemetry **metrics and log events**.
|
|
206
|
+
The **Agents** tab reconstructs them into a session-centric view, and splits the
|
|
207
|
+
spend by model, effort, skill, sub-agent and prompt. Powered by the
|
|
208
|
+
[`autotel-agents`](../autotel-agents) package, which also handles opencode and is
|
|
209
|
+
one adapter away from Codex.
|
|
209
210
|
|
|
210
211
|
One command starts the receiver _and_ launches Claude Code wired to it:
|
|
211
212
|
|
|
@@ -214,9 +215,11 @@ npx autotel-devtools claude
|
|
|
214
215
|
```
|
|
215
216
|
|
|
216
217
|
This sets the telemetry env for a live local view: OTLP **`http/protobuf`**, 1s
|
|
217
|
-
export intervals, and `session.id` kept on metrics.
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
export intervals, and `session.id` kept on metrics. It also turns on Claude
|
|
219
|
+
Code's span hierarchy — `claude_code.interaction` → `llm_request` / `tool`, with
|
|
220
|
+
the sub-agent tree on `parent_agent_id` — which lands in the **Traces** tab. The
|
|
221
|
+
receiver also accepts standard OTLP/gRPC on `:4317`. Then open the UI and switch
|
|
222
|
+
to **Agents**.
|
|
220
223
|
|
|
221
224
|
- `--print-env`: print the env block instead of launching (for managed-settings
|
|
222
225
|
/ MDM / VS Code), e.g. `npx autotel-devtools claude --print-env`.
|
package/dist/cli.cjs
CHANGED
|
@@ -103,12 +103,14 @@ function parseBytes(value) {
|
|
|
103
103
|
if (!value) return void 0;
|
|
104
104
|
const match = value.trim().toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);
|
|
105
105
|
if (!match) return void 0;
|
|
106
|
-
|
|
106
|
+
const factors = {
|
|
107
107
|
b: 1,
|
|
108
108
|
kb: 1024,
|
|
109
109
|
mb: 1024 ** 2,
|
|
110
110
|
gb: 1024 ** 3
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
|
+
const unit = match[2] || "b";
|
|
113
|
+
return Math.floor(Number(match[1]) * factors[unit]);
|
|
112
114
|
}
|
|
113
115
|
function parsePort(value) {
|
|
114
116
|
const n = Number(value);
|
|
@@ -174,6 +176,8 @@ async function startReceiver(options) {
|
|
|
174
176
|
function buildAgentEnv(uiBase, logPrompts) {
|
|
175
177
|
const env = {
|
|
176
178
|
CLAUDE_CODE_ENABLE_TELEMETRY: "1",
|
|
179
|
+
CLAUDE_CODE_ENHANCED_TELEMETRY_BETA: "1",
|
|
180
|
+
OTEL_TRACES_EXPORTER: "otlp",
|
|
177
181
|
OTEL_METRICS_EXPORTER: "otlp",
|
|
178
182
|
OTEL_LOGS_EXPORTER: "otlp",
|
|
179
183
|
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf",
|
|
@@ -182,8 +186,10 @@ function buildAgentEnv(uiBase, logPrompts) {
|
|
|
182
186
|
OTEL_LOGS_EXPORT_INTERVAL: "1000",
|
|
183
187
|
OTEL_METRICS_INCLUDE_SESSION_ID: "true"
|
|
184
188
|
};
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
return logPrompts ? {
|
|
190
|
+
...env,
|
|
191
|
+
OTEL_LOG_USER_PROMPTS: "1"
|
|
192
|
+
} : env;
|
|
187
193
|
}
|
|
188
194
|
function printEnvBlock(env) {
|
|
189
195
|
for (const [key, value] of Object.entries(env)) process.stdout.write(`export ${key}=${value}\n`);
|
package/dist/cli.js
CHANGED
|
@@ -103,12 +103,14 @@ function parseBytes(value) {
|
|
|
103
103
|
if (!value) return void 0;
|
|
104
104
|
const match = value.trim().toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);
|
|
105
105
|
if (!match) return void 0;
|
|
106
|
-
|
|
106
|
+
const factors = {
|
|
107
107
|
b: 1,
|
|
108
108
|
kb: 1024,
|
|
109
109
|
mb: 1024 ** 2,
|
|
110
110
|
gb: 1024 ** 3
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
|
+
const unit = match[2] || "b";
|
|
113
|
+
return Math.floor(Number(match[1]) * factors[unit]);
|
|
112
114
|
}
|
|
113
115
|
function parsePort(value) {
|
|
114
116
|
const n = Number(value);
|
|
@@ -174,6 +176,8 @@ async function startReceiver(options) {
|
|
|
174
176
|
function buildAgentEnv(uiBase, logPrompts) {
|
|
175
177
|
const env = {
|
|
176
178
|
CLAUDE_CODE_ENABLE_TELEMETRY: "1",
|
|
179
|
+
CLAUDE_CODE_ENHANCED_TELEMETRY_BETA: "1",
|
|
180
|
+
OTEL_TRACES_EXPORTER: "otlp",
|
|
177
181
|
OTEL_METRICS_EXPORTER: "otlp",
|
|
178
182
|
OTEL_LOGS_EXPORTER: "otlp",
|
|
179
183
|
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf",
|
|
@@ -182,8 +186,10 @@ function buildAgentEnv(uiBase, logPrompts) {
|
|
|
182
186
|
OTEL_LOGS_EXPORT_INTERVAL: "1000",
|
|
183
187
|
OTEL_METRICS_INCLUDE_SESSION_ID: "true"
|
|
184
188
|
};
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
return logPrompts ? {
|
|
190
|
+
...env,
|
|
191
|
+
OTEL_LOG_USER_PROMPTS: "1"
|
|
192
|
+
} : env;
|
|
187
193
|
}
|
|
188
194
|
function printEnvBlock(env) {
|
|
189
195
|
for (const [key, value] of Object.entries(env)) process.stdout.write(`export ${key}=${value}\n`);
|