chore: add notebook/MCP telemetry events - #593
Open
emrberk wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds console telemetry for notebooks and the MCP bridge so we can see how these features are actually used. No functional changes — every emit is a fire-and-forget
trackEventwrapped around existing handlers, batched through the existing IndexedDB send pipeline.What's tracked
Notebook interactions — create/duplicate, layout mode, cell add/delete/duplicate/move/rename/run/draw, resize and size-reset (gesture end only, never per tick), view changes and maximize, chart settings (open/save/cancel, save-blocked, type change, reset-to-auto), markdown apply, variables popover, result-tab switching, onboarding modal funnel (open/step/close, including Escape/overlay dismissals).
MCP lifecycle — pairing prompted/accepted/declined (with granted permission level), manual pair, connect/disconnect/connect-failed, permissions changes, setup-command copy, agent-changes popper, status popover. Intentional teardowns (user disconnect, re-pair) are excluded from
mcp.disconnectedso the event only counts real drops.MCP tool calls — one event per call, named per tool (
mcp.add_cell,mcp.run_query, …), emitted after dispatch with an outcome (ok/denied/tool_error/dispatch_error/aborted), a denial reason code where applicable (permission vs. freshness gate), and duration. Unrecognized tool names emitmcp.unknown_toolwith the name capped at 100 chars.Implementation notes
ConsoleEventTracker/mcpToolEvents.ts): it prefix-matches the known denial message constants and deliberately does not parse serialized tool results.🤖 Generated with Claude Code