Skip to content

Add telemetry for AzSdk MCP server tool calls#12063

Merged
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:azsdk_mcp_telemetry
Sep 13, 2025
Merged

Add telemetry for AzSdk MCP server tool calls#12063
praveenkuttappan merged 4 commits into
Azure:mainfrom
praveenkuttappan:azsdk_mcp_telemetry

Conversation

@praveenkuttappan

Copy link
Copy Markdown
Member

Add Open telemetry changes to push MCP server telemetry and logs to app insights

Copilot AI review requested due to automatic review settings September 12, 2025 15:42
@github-actions github-actions Bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Sep 12, 2025

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

This PR adds comprehensive OpenTelemetry infrastructure to the AzSdk MCP server to enable telemetry collection and logging to Application Insights. It introduces a new telemetry service architecture with platform-specific machine information providers for device identification and MAC address hashing.

Key Changes

  • Implements a complete telemetry service with Activity tracking for MCP tool calls
  • Adds platform-specific information providers for Windows, Linux, and macOS to collect device identifiers
  • Integrates Azure Monitor OpenTelemetry exporter for Application Insights connectivity

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
TelemetryWrapper.cs Updates InstrumentedTool to use new telemetry service instead of direct ActivitySource
TelemetryService.cs Core telemetry service implementation with activity creation and tagging
TelemetryLogRecordEraser.cs Processor to clear log content for telemetry privacy
TelemetryConstants.cs Constants for activity names and tag names
InformationProvider/*.cs Platform-specific providers for device ID and MAC address collection
OpenTelemetryExtensions.cs Service registration and Azure Monitor configuration
ServiceRegistrations.cs Integration of telemetry services into DI container
AzSdkToolsMcpServerConfiguration.cs Configuration class for telemetry settings
Azure.Sdk.Tools.Cli.csproj Adds Azure Monitor OpenTelemetry package dependency

Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/HostServer/TelemetryWrapper.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Telemetry/TelemetryConstants.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Extensions/OpenTelemetryExtensions.cs Outdated
Comment thread tools/azsdk-cli/Azure.Sdk.Tools.Cli/Tools/HostServer/TelemetryWrapper.cs Outdated
praveenkuttappan and others added 2 commits September 12, 2025 12:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@praveenkuttappan
praveenkuttappan merged commit e9516f9 into Azure:main Sep 13, 2025
13 checks passed
@praveenkuttappan
praveenkuttappan deleted the azsdk_mcp_telemetry branch September 13, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants