Skip to content

Commit 4ab1b2d

Browse files
Merge pull request #1288 from corbitsdev/cl-9017-telemetry-auth-mcp-2
feat(telemetry): report auth success and MCP connection outcomes
2 parents aa537c0 + 8258717 commit 4ab1b2d

11 files changed

Lines changed: 744 additions & 8 deletions

File tree

‎docs/TELEMETRY.md‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Each event carries a small set of properties:
2727
| `summarizer_failure` | The compaction summary call fails after its retry budget is spent | `provider`, `model`, `error_kind`, `duration_ms` |
2828
| `crash` | A fatal error reaches the process-level handler | `kind`, `error_class` |
2929
| `auth_failure` | A provider rejects the stored credentials | `auth_provider` |
30+
| `auth_success` | Provider setup completes (OAuth login or validated API key) | `auth_provider` |
31+
| `mcp_connect` | An MCP server connection attempt settles | `transport`, `result` |
32+
| `mcp_oauth` | An MCP browser-OAuth callback wait settles | `result` |
3033
| `survey sent` | User submits intentional feedback via `/feedback` | `$survey_id`, `$survey_response`, `$survey_questions`, `turn_trace_id` |
3134

3235
`compaction` is deliberately silent on the runs where the compactor decides
@@ -106,13 +109,21 @@ on `crash` and nowhere else, so the column means one thing everywhere it is
106109
recorded.
107110

108111
`auth_provider` is a separate property for that reason: it names which
109-
provider's sign-in was rejected (`codex`, `xai`, `anthropic`, `other`),
110-
chosen from a fixed first-party set in `src/tui/chrome-state.ts`. No
111-
part of the provider's rejection message is sent.
112+
provider's sign-in was rejected or completed (`codex`, `xai`, `anthropic`,
113+
`other`), chosen from a fixed first-party set (`auth_failure` classifies in
114+
`src/tui/chrome-state.ts`, `auth_success` in `src/telemetry/classify.ts`).
115+
No part of the provider's message is sent. The MCP events follow the same
116+
shape: `mcp_connect` carries `transport` (the connect path that actually ran,
117+
`http` or `stdio`) and `result` (the settled outcome, `ok`, `auth`, `timeout`,
118+
or `fail`), while `mcp_oauth` carries only `result` (`completed`,
119+
`cancelled`, or `timeout`). Server names, URLs, commands, and error text never
120+
leave the process.
112121

113122
The mapping is `src/telemetry/classify.ts`, and the tests that feed each
114123
emission site a deliberately identifying name and assert it reaches no part of
115-
the payload are in `src/telemetry/product-events.test.ts`.
124+
the payload are in `src/telemetry/product-events.test.ts` for the TUI-side
125+
events and `src/mcp/client-telemetry.test.ts` for the MCP connect and OAuth
126+
events.
116127

117128
## AI observability events
118129

0 commit comments

Comments
 (0)