Add telemetry for AzSdk MCP server tool calls#12063
Merged
praveenkuttappan merged 4 commits intoSep 13, 2025
Merged
Conversation
praveenkuttappan
requested review from
benbp,
jeo02,
l0lawrence,
maririos,
richardpark-msft,
samvaity,
scbedd,
smw-ms and
timovv
as code owners
September 12, 2025 15:42
Contributor
There was a problem hiding this comment.
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 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
benbp
reviewed
Sep 12, 2025
benbp
approved these changes
Sep 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Open telemetry changes to push MCP server telemetry and logs to app insights