Skip to content

Conversation

@pamelafox
Copy link
Contributor

Fixes #15

After this change, you can run "azd monitor" to see this custom dashboard pop-up:

Screenshot 2025-12-17 at 7 10 24 AM

The tool call charts are based off KQL queries based off the gen_ai attribute names.

@pamelafox pamelafox requested a review from madebygps December 17, 2025 15:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a custom Azure Portal dashboard for monitoring MCP server statistics and tool calls, addressing issue #15. The dashboard provides visualizations for tool call counts, success rates, latency percentiles, and per-tool usage metrics using KQL queries against Application Insights telemetry data. Additionally, it optimizes infrastructure by conditionally creating Cosmos DB containers only when authentication is enabled.

  • Adds custom Azure Portal dashboard with charts for tool metrics (counts, success/error rates, latency percentiles, and per-tool breakdowns)
  • Conditionally creates auth-related Cosmos DB containers only when authentication is enabled (Keycloak or Entra OAuth Proxy)
  • Updates documentation to explain how to access the dashboard via azd monitor

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
infra/appinsights-dashboard.bicep New Bicep module defining Azure Portal dashboard with 10 tiles visualizing MCP tool call metrics and server performance using KQL queries
infra/main.bicep Adds authEnabled variable and conditionally creates Cosmos DB containers for user-expenses and oauth-clients only when auth is enabled; integrates dashboard module
servers/opentelemetry_middleware.py Removes historical comment about PR #2083 that's no longer needed
README.md Documents azd monitor command to access the dashboard and clarifies Application Insights access steps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@madebygps madebygps left a comment

Choose a reason for hiding this comment

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

lgtm

@pamelafox pamelafox merged commit c0d368e into Azure-Samples:main Dec 17, 2025
2 checks passed
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.

Add a nice App Insights dashboard

2 participants