Skip to content

Combine MonitorInstrumentation into Monitor#2087

Merged
srnagar merged 12 commits intomicrosoft:mainfrom
xiang17:xiang17/MonitorInstrumentation_rename
Mar 19, 2026
Merged

Combine MonitorInstrumentation into Monitor#2087
srnagar merged 12 commits intomicrosoft:mainfrom
xiang17:xiang17/MonitorInstrumentation_rename

Conversation

@xiang17
Copy link
Copy Markdown
Member

@xiang17 xiang17 commented Mar 17, 2026

What does this PR do?

[Provide a clear, concise description of the changes]

Combine the tools/Azure.Mcp.Tools.MonitorInstrumentation folder introduced by #1960 into tools/Azure.Mcp.Tools.Monitor.

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Comment thread servers/Azure.Mcp.Server/CHANGELOG.md Outdated
Comment thread tools/Azure.Mcp.Tools.Monitor/src/MonitorSetup.cs Outdated
@xiang17 xiang17 marked this pull request as ready for review March 18, 2026 08:35
@xiang17 xiang17 requested review from a team and jongio as code owners March 18, 2026 08:35
Copy link
Copy Markdown
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 consolidates the previously separate Azure Monitor Instrumentation tool area into the existing Azure Monitor tool, updating command registration, tool IDs/CLI paths, and relocating instrumentation resources and unit tests accordingly.

Changes:

  • Removed the standalone Azure.Mcp.Tools.MonitorInstrumentation project/area setup and registered its commands under monitor instrumentation.
  • Updated tool IDs / CLI docs / e2e prompts to use monitor_instrumentation_* and azmcp monitor instrumentation ....
  • Moved instrumentation models/pipeline/generators/detectors/resources into Azure.Mcp.Tools.Monitor and updated unit tests and resource paths.

Reviewed changes

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

Show a summary per file
File Description
tools/Azure.Mcp.Tools.MonitorInstrumentation/tests/Azure.Mcp.Tools.MonitorInstrumentation.UnitTests/Azure.Mcp.Tools.MonitorInstrumentation.UnitTests.csproj Removed obsolete unit test project for the standalone area.
tools/Azure.Mcp.Tools.MonitorInstrumentation/src/MonitorInstrumentationSetup.cs Removed standalone area setup/command registration.
tools/Azure.Mcp.Tools.MonitorInstrumentation/src/GlobalUsings.cs Removed standalone global usings.
tools/Azure.Mcp.Tools.MonitorInstrumentation/src/Azure.Mcp.Tools.MonitorInstrumentation.csproj Removed standalone tool project.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Tools/SendBrownfieldAnalysisToolTests.cs Updated test namespaces/usings to the merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Tools/OrchestratorToolTests.cs Updated test namespaces/usings to the merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Tools/ListLearningResourcesToolTests.cs Updated namespaces and adjusted test resource output path (Instrumentation/Resources).
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Tools/GetLearningResourceToolTests.cs Updated namespaces and adjusted test resource output path (Instrumentation/Resources).
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Models/OnboardingSpecValidatorTests.cs Updated model namespace references to the merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Models/OnboardingSpecBuilderTests.cs Updated model namespace references to the merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/SendBrownfieldAnalysisTool.cs Re-namespaced tool into Azure.Mcp.Tools.Monitor.Tools.
tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/OrchestratorTool.cs Re-namespaced tool into Azure.Mcp.Tools.Monitor.Tools.
tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/ListLearningResourcesTool.cs Updated resource base path to Instrumentation/Resources and namespace.
tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/GetLearningResourceTool.cs Updated resource root to Instrumentation/Resources and namespace.
tools/Azure.Mcp.Tools.Monitor/src/Options/Instrumentation/MonitorInstrumentationOptionDefinitions.cs Moved option definitions into Azure.Mcp.Tools.Monitor.Options.
tools/Azure.Mcp.Tools.Monitor/src/Options/Instrumentation/CommandOptions.cs Moved command option POCOs into Azure.Mcp.Tools.Monitor.Options.
tools/Azure.Mcp.Tools.Monitor/src/MonitorSetup.cs Registers instrumentation services/commands and adds monitor instrumentation subgroup.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ServiceOptionsTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/SamplingTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ProcessorTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/OnboardingSpecValidator.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/OnboardingSpecBuilder.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/OnboardingSpec.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/OnboardingJsonContext.cs Updated source-gen context namespace and referenced types.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/OnboardingAction.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/InitializerTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ImplementationTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/GeneratorConfigLoader.cs Updated embedded resource prefix for merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Enums.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Decision.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Constants.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ClientUsageTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ClientUsageEntryTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/BrownfieldFindings.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/AnalysisTemplate.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Analysis.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ActionDetailsExtensions.cs Re-namespaced model into Azure.Mcp.Tools.Monitor.Models.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/appinsights-2x-to-3x-no-code-change.md Added migrated learning resource content under Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/appinsights-2x-to-3x-code-migration.md Added migrated learning resource content under Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/templates/aspnetcore/instrumentation-code.cs Added code template used by generator config.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/aspnetcore-greenfield.json Added generator config for ASP.NET Core greenfield.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/aspnet-classic-greenfield.json Added generator config for ASP.NET classic greenfield.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/aspnetcore-setup.md Added example learning resource under Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/opentelemetry-pipeline.md Added concept learning resource under Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/azure-monitor-distro.md Added concept learning resource under Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/WithTracing.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/WithMetrics.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/WithLogging.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/UseAzureMonitorExporter.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/UseAzureMonitor.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/SdkCreateTracerProviderBuilder.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/Sampling.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/OpenTelemetrySdkCreate.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/LogProcessors.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ConfigureResource.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ConfigureOpenTelemetryProvider.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/AzureMonitorExporter.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/AddOpenTelemetry.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/AddApplicationInsightsTelemetry.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ActivityProcessors.md Added API reference learning resource.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Pipeline/WorkspaceAnalyzer.cs Updated namespaces for pipeline entrypoint.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/IGenerator.cs Updated namespaces for generator interface.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/AspNetCoreGreenfieldGenerator.cs Updated namespaces for generator implementation.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/AspNetCoreBrownfieldGenerator.cs Updated namespaces for generator implementation.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/PythonInstrumentationRegistry.cs Updated namespaces for detector support code.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/IDetectors.cs Updated namespaces for detector interfaces.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/DotNetLanguageDetector.cs Updated namespaces for detector implementation.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/DotNetInstrumentationDetector.cs Updated namespaces for detector implementation.
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/DotNetAppTypeDetector.cs Updated namespaces for detector implementation.
tools/Azure.Mcp.Tools.Monitor/src/GlobalUsings.cs Added System.CommandLine.Parsing global using for moved commands.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/SendBrownfieldAnalysisCommand.cs Updated command namespace/usings to merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/OrchestratorStartCommand.cs Updated command namespace/usings to merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/OrchestratorNextCommand.cs Updated command namespace/usings to merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/MonitorInstrumentationJsonContext.cs Updated JSON context namespace for commands.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/ListLearningResourcesCommand.cs Updated command namespace/usings to merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/GetLearningResourceCommand.cs Updated command namespace/usings to merged Monitor tool.
tools/Azure.Mcp.Tools.Monitor/src/Azure.Mcp.Tools.Monitor.csproj Embedded/copies instrumentation resources and templates in merged project.
servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json Updated tool IDs to monitor_instrumentation_*.
servers/Azure.Mcp.Server/src/Program.cs Removed registration of the standalone MonitorInstrumentation area.
servers/Azure.Mcp.Server/docs/e2eTestPrompts.md Updated tool names/prompts to new monitor_instrumentation_* IDs.
servers/Azure.Mcp.Server/docs/azmcp-commands.md Updated CLI examples to azmcp monitor instrumentation ....
servers/Azure.Mcp.Server/README.md Updated Monitor instrumentation section placement/description.
servers/Azure.Mcp.Server/CHANGELOG.md Documented breaking change and tool/CLI rename.
Microsoft.Mcp.slnx Removed MonitorInstrumentation projects from the solution.
Comments suppressed due to low confidence (1)

tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/GeneratorConfigLoader.cs:82

  • LoadConfig builds the manifest resource name using generatorType verbatim, but the generator types passed in include hyphens (e.g., aspnetcore-greenfield). MSBuild’s default manifest resource naming sanitizes file names/paths (commonly converting - to _), so this lookup is likely to fail at runtime with FileNotFoundException. Consider normalizing generatorType (e.g., replace - with _) when constructing resourceName, so it matches the embedded resource logical name.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread servers/Azure.Mcp.Server/CHANGELOG.md Outdated
xiang17 and others added 2 commits March 18, 2026 02:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread servers/Azure.Mcp.Server/changelog-entries/1773863632737.yaml Outdated
Comment thread servers/Azure.Mcp.Server/changelog-entries/1773863632737.yaml Outdated
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Mar 19, 2026
@srnagar srnagar merged commit 0f7641a into microsoft:main Mar 19, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Mar 19, 2026
@xiang17 xiang17 deleted the xiang17/MonitorInstrumentation_rename branch March 25, 2026 00:02
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Apr 20, 2026
* Move files into Azure.Mcp.Tools.Monitor folder

* Only namespace renames

* Merge project commands

* Update changelog

* Address PR feedback

* `dotnet format Microsoft.Mcp.slnx` to fix error in "pullrequest (Build Analyze)" check

* ran ToolDescriptionEvaluator

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Use CONTRIBUTING.md#adding-a-new-command for updating changelog

* update changelog

* add more details in changelog

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants