You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retire the inference_turn event in favour of $ai_generation
Both events fired from the same hook with the same payload, so every
turn was reported twice, and only $ai_generation reaches PostHog's LLM
analytics views — inference_turn's numbers were readable in the raw
event stream and nowhere else. This is a deliberate removal of the
duplicate, not an oversight: nothing outside this repository consumed
inference_turn.
Copy file name to clipboardExpand all lines: docs/TELEMETRY.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,12 @@ includes prompts, code, file contents, or paths.
6
6
7
7
## What's collected
8
8
9
-
Five events, each with a small set of properties:
9
+
Four events, each with a small set of properties:
10
10
11
11
| Event | When | Properties |
12
12
|---|---|---|
13
13
|`cli_start`| Once per used session (see First-run disclosure) | (none beyond common properties) |
14
14
|`session_end`| When a TUI session finishes |`status`, `turn_count`, `duration_ms`, `session_mode`, `exit_reason`|
15
-
|`inference_turn`| Once per completed turn |`provider_id`, `model_id`, `input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens`, `thinking_tokens`, `duration_ms`|
16
15
|`$ai_generation`| Once per turn — on completion, and again on a turn that ends in an error |`$ai_trace_id`, `$ai_provider`, `$ai_model`, `$ai_input_tokens`, `$ai_output_tokens`, `$ai_latency`, `$ai_is_error`, `$ai_error`, `cache_read_tokens`, `cache_write_tokens`, `thinking_tokens`|
17
16
|`$ai_span`| Once per top-level tool call in a completed turn |`$ai_trace_id`, `$ai_span_id`, `$ai_parent_id`, `$ai_span_name`, `$ai_is_error`|
18
17
@@ -26,10 +25,9 @@ request IP; no location data is collected by the client.
26
25
Every event is capped to an explicit property allowlist before it leaves the
27
26
process — no other field can ever be attached, even by accident.
28
27
29
-
`provider_id` (and its AI-event equivalent `$ai_provider`) is the canonical
30
-
provider kind resolved by the runtime (e.g. `openai-compatible`), never the
31
-
free-text name you gave the provider in onboarding or settings. `model_id`
32
-
(equivalently `$ai_model`) is the model identifier exactly as
28
+
`$ai_provider` is the canonical provider kind resolved by the runtime (e.g.
29
+
`openai-compatible`), never the free-text name you gave the provider in
30
+
onboarding or settings. `$ai_model` is the model identifier exactly as
33
31
configured — it is the one user-entered string that is sent, so do not put
0 commit comments