-
Notifications
You must be signed in to change notification settings - Fork 355
Remove ErrorDetails from telemetry #1511
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
Remove ErrorDetails from telemetry #1511
Conversation
There was a problem hiding this 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 removes the capture of ErrorDetails in telemetry by commenting out calls to AddTag(TagName.ErrorDetails, ...) across the codebase. The change aims to prevent sensitive error information from being sent to telemetry endpoints.
Changes:
- Commented out
ErrorDetailstag additions in exception handling across multiple files - Updated documentation to reflect the removal of ErrorDetails telemetry
- Commented out test assertions that verified ErrorDetails tags were set
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| core/Microsoft.Mcp.Core/src/Commands/BaseCommand.cs | Removed ErrorDetails tag from base exception handler |
| core/Azure.Mcp.Core/src/Commands/CommandFactory.cs | Removed ErrorDetails tags from command execution error handling |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs | Removed ErrorDetails tags from tool execution and list tools error handlers |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs | Commented out test assertions for ErrorDetails tags |
| servers/Azure.Mcp.Server/docs/new-command.md | Updated documentation example to reflect removal of ErrorDetails tag |
Comments suppressed due to low confidence (1)
core/Azure.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs:123
- This line still uses
TagName.ErrorDetailsand should be commented out or removed to complete the removal of ErrorDetails from telemetry. This is inconsistent with the other changes in the PR.
activity?.SetTag(TagName.ErrorDetails, textContent.Text);
| if (response.Status < HttpStatusCode.OK || response.Status >= HttpStatusCode.Ambiguous) | ||
| { | ||
| activity?.SetStatus(ActivityStatusCode.Error).AddTag(TagName.ErrorDetails, response.Message); | ||
| activity?.SetStatus(ActivityStatusCode.Error);; //.AddTag(TagName.ErrorDetails, response.Message); |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double semicolon syntax error. Remove the extra semicolon after SetStatus(ActivityStatusCode.Error).
| activity?.SetStatus(ActivityStatusCode.Error);; //.AddTag(TagName.ErrorDetails, response.Message); | |
| activity?.SetStatus(ActivityStatusCode.Error); //.AddTag(TagName.ErrorDetails, response.Message); |
core/Azure.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs
Outdated
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs
Outdated
Show resolved
Hide resolved
core/Azure.Mcp.Core/src/Areas/Server/Commands/Runtime/McpRuntime.cs
Outdated
Show resolved
Hide resolved
|
The code that adds the error details are commented out instead of removed. Do you intend to bring them back some time soon? |
They will eventually be added back, but for now I'll delete the code as where this information is captured may change locations. |
What does this PR do?
Removes capturing
ErrorDetailsin telemetry.GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationeng/scripts/Process-PackageReadMe.ps1. See Package README/servers/Azure.Mcp.Server/docs/azmcp-commands.mdand/or/docs/fabric-commands.md.\eng\scripts\Update-AzCommandsMetadata.ps1to update tool metadata in azmcp-commands.md (required for CI)ToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.json/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline