Skip to content

Commit 4f13fa6

Browse files
Amit Joshiclaude
andcommitted
docs(telemetry): describe only live telemetry; drop skill_completed references
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3bf0bbf commit 4f13fa6

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

shared/telemetry/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Every event carries a fixed allowlist enforced by `lib/events.js`. Field names m
3434

3535
- `pluginName`, `pluginVersion` — read from the plugin's `.claude-plugin/plugin.json`
3636
- `sessionId` — random UUID generated once per Node process; not persisted
37-
- `correlationId` — a per-start unique ID generated inline at emit time (it no longer joins events; `skill_completed` is no longer emitted)
37+
- `correlationId` — a per-start unique ID generated inline at emit time
3838
- `osName`, `osVersion``process.platform` and OS release string
3939
- `nodeVersion` — major version only, e.g. `v22`
4040

@@ -47,14 +47,13 @@ Every event carries a fixed allowlist enforced by `lib/events.js`. Field names m
4747
**Per-event:**
4848

4949
- `skillName` (on every event)
50-
- `outcome` (`success` | `failure`), `durationMs` (int), `errorClass` (Error constructor name only), `errorDescription` (`err.code` only) — **defined for `skill_completed`, which is no longer emitted.** The `buildSkillCompleted` builder and these fields remain in `lib/events.js` (dormant, not wired to any hook).
5150
- `eventInfo` — caller-supplied JSON object (dynamic Kusto column). The caller is responsible for not putting PII in this payload.
5251

5352
## What is NEVER sent
5453

5554
File paths, cwd, env vars (except the telemetry kill switch), site names, Dataverse URLs, stack traces, `err.message` text, skill arguments, tool inputs, prompt text, usernames, hostnames.
5655

57-
`errorClass` is the `Error` constructor name only (e.g. `TypeError`). `errorDescription` is restricted to `err.code` (e.g. `ENOENT`, `ECONNREFUSED`) — the free-form `err.message` is never emitted because it can contain file paths, GUIDs, or other user context. The dispatcher also runs a defense-in-depth allowlist filter against `FIELD_TYPES` before serializing, so any field that bypasses the builders is dropped before it reaches the wire.
56+
The dispatcher runs a defense-in-depth allowlist filter against `FIELD_TYPES` before serializing, so any field that bypasses the builders is dropped before it reaches the wire.
5857

5958
## Privacy posture
6059

@@ -73,7 +72,7 @@ shared/telemetry/
7372
├─ ikey.json # template config (placeholder values)
7473
├─ sync-to-plugin.js # copies lib/ + ikey.json into a plugin
7574
├─ lib/
76-
│ ├─ events.js # FIELD_TYPES allowlist + buildSkillStarted (+ buildSkillCompleted, retained but not wired)
75+
│ ├─ events.js # FIELD_TYPES allowlist + buildSkillStarted
7776
│ ├─ emit-spawn.js # fireAndForget — spawn detached dispatcher
7877
│ ├─ emit-dispatcher.js # detached child — kill switches, sanitize, POST
7978
│ ├─ emit-from-prompt.js # UserPromptSubmit hook helper — detect slash command + emit skill_started
@@ -122,7 +121,7 @@ Edit `plugins/<your-plugin>/scripts/lib/telemetry/ikey.json`:
122121
In `plugins/<your-plugin>/hooks/hooks.json`, register the three hook scripts that ship with this library pattern. The Power Pages plugin's `hooks.json` is the reference example. Copy these three hook entry points into your `hooks/` directory:
123122

124123
- `run-skill-pretool-telemetry.js` — emits `skill_started` on `PreToolUse(Skill)`
125-
- `run-skill-posttool-validation.js` — runs your validator on `PostToolUse(Skill)` (no telemetry emission)
124+
- `run-skill-posttool-validation.js` — runs your validator on `PostToolUse(Skill)`
126125
- `run-user-prompt-telemetry.js` — emits `skill_started` on `UserPromptSubmit` when the prompt is a tracked `/plugin:skill` slash command
127126

128127
These hooks must call out to your plugin's `scripts/lib/<plugin>-hook-utils.js` for the tracked-skill list. Adapt the imports to your plugin's layout.

0 commit comments

Comments
 (0)