Skip to content

feat(telemetry): instrument file, prompt, selection and apply-edits tools#328

Open
cameroncooke wants to merge 1 commit into
cameroncooke/sentry-05-context-builder-telemetryfrom
cameroncooke/sentry-06-window-tool-telemetry
Open

feat(telemetry): instrument file, prompt, selection and apply-edits tools#328
cameroncooke wants to merge 1 commit into
cameroncooke/sentry-05-context-builder-telemetryfrom
cameroncooke/sentry-06-window-tool-telemetry

Conversation

@cameroncooke

@cameroncooke cameroncooke commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Instruments the file / prompt / selection / apply-edits window tools.

Stack: 6/10 · depends on PR 2 · Refs GH-183

What this changes

  • WorkspaceToolSentryTelemetry.swift (new) — shared helper for these providers.
  • MCPFileToolProvider.swift (file.read, file.edit.apply), MCPApplyEditsToolProvider.swift, MCPPromptContextToolProvider.swift (prompt.render), MCPSelectionToolProvider.swift (selection.update) — span wrappers around existing work.

Business rules

  • Records counts only (selection_file_count, result_count) and cache_hit.
  • No path, name, file content, prompt text, or edit content is ever an attribute.

Key decisions

  • A single shared helper keeps the four providers consistent and prevents any provider from inventing a non-allow-listed attribute.

Test plan

  • Builds in both modes. ✅ verified.

@cameroncooke cameroncooke force-pushed the cameroncooke/sentry-05-context-builder-telemetry branch from 4c2cbeb to bd69a32 Compare June 29, 2026 21:40
@cameroncooke cameroncooke force-pushed the cameroncooke/sentry-06-window-tool-telemetry branch from 0d8bd9f to 6e0dd52 Compare June 29, 2026 21:40
@cameroncooke cameroncooke force-pushed the cameroncooke/sentry-05-context-builder-telemetry branch from bd69a32 to ec18666 Compare June 29, 2026 22:49
@cameroncooke cameroncooke force-pushed the cameroncooke/sentry-06-window-tool-telemetry branch from 6e0dd52 to abc7688 Compare June 29, 2026 22:49
@cameroncooke cameroncooke marked this pull request as ready for review June 30, 2026 01:06
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.

1 participant