Skip to content

Profiler Agent Tools for GitHub Copilot#21088

Draft
allancascante wants to merge 48 commits intomainfrom
dev/allancascante/001-profiler-agent-tools
Draft

Profiler Agent Tools for GitHub Copilot#21088
allancascante wants to merge 48 commits intomainfrom
dev/allancascante/001-profiler-agent-tools

Conversation

@allancascante
Copy link
Contributor

Description

This PR adds 4 read-only Copilot Agent Tools that allow users to query SQL Server Profiler (XEvent) data using natural language.

mssql_profiler_list_sessions Discover active XEvent profiler sessions
mssql_profiler_get_session_summary Get session statistics (event counts, top databases, top event types)
mssql_profiler_query_events Filter and sort profiler events by duration, database, event type
mssql_profiler_get_event_detail Inspect full details of a specific event

How to Use

Start a Profiler session from Object Explorer (right-click server → Launch Profiler)

Open Copilot Chat in Agent mode

Try prompts like:
"What XEvent sessions are running?"
"Show me a summary of my profiler session"
"Find the slowest queries in the profiler"
"Show events with duration greater than 1000 microseconds"

Implementation Approach

This feature was developed using the SpecKit workflow (/speckit.specify → /speckit.plan → /speckit.tasks → /speckit.implement), which generated:

Feature specification with user stories and acceptance criteria
Technical design with data models and API contracts
50+ implementation tasks organized by user story
Key learnings documented in the spec for future reference:

Tools require dual registration (package.json + mainController.ts)
Use "XEvent" terminology for LLM discoverability
Show session names (not IDs) in confirmation dialogs

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines

Allan Cascante added 30 commits January 19, 2026 12:37
…, toolbar ui; notifications and profile session commands.
Implements comprehensive telemetry tracking for the Profiler feature:

- Session lifecycle events:
  - ProfilerSessionCreated: When a new session is created with template
  - ProfilerSessionStarted: When profiling begins
  - ProfilerSessionPaused: When session is paused (includes event count)
  - ProfilerSessionResumed: When session is resumed
  - ProfilerSessionStopped: When session is stopped (includes event count)
  - ProfilerSessionClosed: When webview is closed (tracks if session was stopped)

- User interaction events:
  - ProfilerClearData: When events are cleared (includes count before clear)
  - ProfilerAutoScrollToggled: When auto-scroll is enabled/disabled

- Additional actions for future features:
  - ProfilerFilterApplied/Cleared: For filtering feature
  - ProfilerXelFileOpened: For XEL file support
  - ProfilerExportCsv: For CSV export feature

Added:
- profilerTelemetry.ts: Centralized telemetry service with typed properties
- TelemetryViews.Profiler: New telemetry view enum value
- 13 new TelemetryActions for profiler-specific events
- Added 'trigger' parameter to onExportToCsv callback to distinguish
  between manual export (toolbar button) and close prompt export
- Send ProfilerExportCsv telemetry after successful export with:
  - rowCount: number of rows exported
  - exportTrigger: 'manual' or 'closePrompt'
- Integrated with merged profiler_export branch
…ncascante/profiler_telemetry_implementation
- Moved exportToCsv from ProfilerSelectedEventDetails to ProfilerReducers
  (exportToCsv is a reducer action, not an event property)
- Fixed profiler.tsx to pass totalEventCount and onExportToCsv to
  ProfilerToolbar instead of ProfilerFilterDialog
- Build now compiles without errors
Allan Cascante and others added 18 commits January 28, 2026 12:29
…specification, tasks, and task-to-issues conversion

- Implemented speckit.constitution.agent for managing project constitution updates and synchronization.
- Created speckit.implement.agent to execute implementation plans based on defined tasks.
- Developed speckit.plan.agent to facilitate the planning workflow and generate design artifacts.
- Added speckit.specify.agent for creating and updating feature specifications from natural language descriptions.
- Introduced speckit.tasks.agent to generate actionable, dependency-ordered task lists from design artifacts.
- Implemented speckit.taskstoissues.agent to convert tasks into GitHub issues based on existing design documents.
- Created prompts for each agent to streamline user interactions and ensure proper execution flow.
- Created agent-file-template.md for project development guidelines.
- Added checklist-template.md for feature-specific checklists.
- Introduced plan-template.md for implementation planning of features.
- Developed spec-template.md for detailed feature specifications.
- Established tasks-template.md for organizing tasks related to feature implementation.
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