Skip to content

agentHost: track todo store telemetry - #328267

Draft
amunger wants to merge 3 commits into
mainfrom
agents/telemetry-parity-migration-todolisttool
Draft

agentHost: track todo store telemetry#328267
amunger wants to merge 3 commits into
mainfrom
agents/telemetry-parity-migration-todolisttool

Conversation

@amunger

@amunger amunger commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Classify successful Agent Host SQL access to todos and todo_deps without exposing raw queries. Add toolCallId correlation to generic tool telemetry while keeping the existing local todo-list event unchanged.

Classify successful Agent Host SQL access to todos and todo_deps without exposing raw queries. Add toolCallId correlation to generic tool telemetry while keeping the existing local todo-list event unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 30, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds privacy-safe telemetry for successful Agent Host SQL operations involving todo storage.

Changes:

  • Classifies todo SQL operations by access type and target.
  • Emits correlated todo-store and generic tool telemetry.
  • Adds classification and telemetry integration tests.
Show a summary per file
File Description
src/vs/platform/telemetry/common/todoStoreTelemetry.ts Defines the new telemetry event.
src/vs/platform/telemetry/common/languageModelToolTelemetry.ts Adds tool-call correlation.
src/vs/platform/agentHost/test/node/agentHostToolCallTracker.test.ts Tests SQL classification.
src/vs/platform/agentHost/test/node/agentHostToolCallTelemetry.test.ts Tests telemetry emission and filtering.
src/vs/platform/agentHost/node/agentSideEffects.ts Captures finalized tool input.
src/vs/platform/agentHost/node/agentHostToolCallTracker.ts Classifies operations and triggers telemetry.
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts Emits the new event and correlation ID.

Review details

Comments suppressed due to low confidence (1)

src/vs/platform/agentHost/node/agentHostToolCallTracker.ts:248

  • The operation is classified from verbs anywhere in the statement rather than from how the todo tables are used. For example, INSERT INTO archive SELECT * FROM todos is reported as mixed, although todo storage is only read; SELECT * FROM todos WHERE title = 'update' is also reported as mixed. This makes the new telemetry inaccurate. Please classify reads/writes against their actual table references (and ignore literals/comments), using a tokenizer/parser or equivalently structured matching.
	const reads = /\bselect\b/i.test(query);
	const writes = /\b(?:insert|update|delete|replace|create|drop|alter)\b/i.test(query);
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/vs/platform/agentHost/node/agentHostToolCallTracker.ts Outdated
amunger and others added 2 commits July 30, 2026 13:39
Tokenize SQL before deriving todo telemetry so literals, comments, aliases, and unrelated writes cannot create false todo-store operations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants