-
Notifications
You must be signed in to change notification settings - Fork 46
Add MCP tool usage statistics to logs command #13073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot runs logs command and show output |
The Console Output: The command shows two new tables when MCP servers are detected in workflow runs:
Example Console Output: JSON Output: With
The data is aggregated across all downloaded workflow runs, with weighted averaging for duration metrics and max tracking for I/O sizes. See full demo output: /tmp/demo_output.md |
Extends
gh aw logsto display aggregated MCP tool call statistics from gateway.jsonl files, reusing the data structures introduced in #13067 for the audit command.Changes
Data structures
MCPToolUsageSummarytoLogsDatafor aggregating tool usage across runsProcessedRun,RunSummary, andDownloadResultwithMCPToolUsagefieldData extraction and aggregation
extractMCPToolUsageData()for each run inlogs_orchestrator.gobuildMCPToolUsageSummary()to merge statistics across runs:Output
Example
Returns aggregated MCP tool usage in
mcp_tool_usagefield with server stats, tool summaries, and individual call records for analysis.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.