Monitor Instrumentation: Support more languages and frameworks#2115
Open
xiang17 wants to merge 21 commits intomicrosoft:mainfrom
Open
Monitor Instrumentation: Support more languages and frameworks#2115xiang17 wants to merge 21 commits intomicrosoft:mainfrom
xiang17 wants to merge 21 commits intomicrosoft:mainfrom
Conversation
…tation_rest Switch ASP.NET Core greenfield onboarding to Application Insights 3.x
Contributor
There was a problem hiding this comment.
Pull request overview
Expands the Azure Monitor Instrumentation tool to support additional languages/frameworks (notably Node.js and Python), adds an enhancement-selection step to the orchestration flow, and broadens .NET (Application Insights 3.x) onboarding/migration guidance and generators.
Changes:
- Added a new
send_enhanced_selectioncommand/tool and supporting options, wiring, and docs. - Introduced new detectors and generators for Node.js/Python and additional .NET app types (classic ASP.NET, Worker Service, enhancements).
- Expanded learning resources/templates and updated generator configs/docs to reflect Application Insights 3.x migration/onboarding patterns.
Reviewed changes
Copilot reviewed 101 out of 101 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Monitor/tests/Azure.Mcp.Tools.Monitor.UnitTests/Instrumentation/Tools/SendBrownfieldAnalysisToolTests.cs | Updates unit tests for new brownfield findings shape (added logging findings param). |
| tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/SendEnhancedSelectionTool.cs | New tool to accept enhancement selections and generate an enhancement plan. |
| tools/Azure.Mcp.Tools.Monitor/src/Tools/Instrumentation/SendBrownfieldAnalysisTool.cs | Extends brownfield submission to include logging findings. |
| tools/Azure.Mcp.Tools.Monitor/src/Options/Instrumentation/MonitorInstrumentationOptionDefinitions.cs | Adds enhancement-keys option; updates findings JSON description. |
| tools/Azure.Mcp.Tools.Monitor/src/Options/Instrumentation/CommandOptions.cs | Adds options model for enhanced selection command. |
| tools/Azure.Mcp.Tools.Monitor/src/MonitorSetup.cs | Registers new detectors/generators and the new enhanced selection tool/command. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/TelemetryPipelineTemplate.cs | New analysis template section for telemetry pipeline findings. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/ServiceOptionsTemplate.cs | Extends service-options template with more WorkerService/AppInsights 3.x fields. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/LoggingTemplate.cs | New analysis template section for logging findings. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Constants.cs | Adds learning resources/packages/intents constants for new scenarios. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/BrownfieldFindings.cs | Adds LoggingFindings to brownfield payload model. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/AnalysisTemplate.cs | Adds default placeholders for telemetry pipeline + logging findings. |
| tools/Azure.Mcp.Tools.Monitor/src/Models/Instrumentation/Analysis.cs | Adds IsTargetVersion to ExistingInstrumentation. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/workerservice-2x-to-3x-no-code-change.md | New migration doc for Worker Service “no code change” path. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/workerservice-2x-to-3x-code-migration.md | New Worker Service code-migration doc (2.x→3.x). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/ilogger-migration.md | New logger/filter migration doc for 2.x→3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/console-2x-to-3x-code-migration.md | New console-app migration doc for 2.x→3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/migration/dotnet/aad-authentication-migration.md | New AAD auth migration doc for 2.x→3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/templates/express/instrumentation-code.js | New Express code template for Node.js distro setup. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/templates/aspnetcore/instrumentation-code.cs | Updates ASP.NET Core snippet to App Insights (vs distro). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/aspnetcore-greenfield.json | Updates ASP.NET Core greenfield flow to App Insights 3.x approach/package/config. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/generator-configs/aspnet-classic-greenfield.json | Adjusts classic ASP.NET onboarding flow (VS NuGet PMC + manual verify step). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/python/generic-setup.md | New Python generic setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/python/genai-setup.md | New Python GenAI setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/python/flask-setup.md | New Python Flask setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/nodejs/redis-setup.md | New Node.js + Redis setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/nodejs/postgres-setup.md | New Node.js + PostgreSQL setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/nodejs/nestjs-setup.md | New Node.js NestJS setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/nodejs/mongodb-setup.md | New Node.js + MongoDB setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/nodejs/express-setup.md | New Node.js Express setup example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/workerservice-setup.md | New .NET Worker Service setup example for App Insights. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/aspnetcore-setup.md | Updates ASP.NET Core example to App Insights 3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/aspnetcore-distro-setup.md | Adds a distro-focused ASP.NET Core example (kept separately). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/aspnet-classic-setup.md | Adds classic ASP.NET App Insights setup guidance. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/python/opentelemetry-pipeline.md | New Python OTel pipeline concept doc. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/python/azure-monitor-overview.md | New Azure Monitor (Python) overview concept doc. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/nodejs/azure-monitor-overview.md | New Azure Monitor (Node.js) overview concept doc. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/opentelemetry-pipeline.md | Updates .NET concept cross-links to App Insights content. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/azure-monitor-distro.md | Updates distro doc to point to distro-specific example. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/aspnet-classic-appinsights.md | New classic ASP.NET App Insights concept doc. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/concepts/dotnet/appinsights-aspnetcore.md | New App Insights ASP.NET Core concept doc. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/TelemetryConfigurationBuilder.md | New API reference for non-DI extensibility entry point. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/TelemetryClient.md | New TelemetryClient breaking-changes doc for 3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/SqlClientInstrumentation.md | New SqlClient instrumentation API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/RedisInstrumentation.md | New Redis instrumentation API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/OtlpExporter.md | New OTLP exporter API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/LogProcessors.md | Adds missing using OpenTelemetry.Logs; note for logger provider filtering. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/HttpInstrumentation.md | New HTTP enrichment/filtering API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/EntityFrameworkInstrumentation.md | New EF Core instrumentation API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ConsoleExporter.md | New console exporter API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ConfigureOpenTelemetryProvider.md | Adds examples/usings for ConfigureResource patterns. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/ApplicationInsightsWeb.md | New classic ASP.NET Web SDK API reference. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/api-reference/dotnet/AddApplicationInsightsTelemetryWorkerService.md | New Worker Service API reference for App Insights 3.x. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/WorkerServiceGreenfieldGenerator.cs | New greenfield generator for Worker Service onboarding. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/WorkerServiceBrownfieldGenerator.cs | New brownfield generator for Worker Service migration. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/WinstonNodeJsGreenfieldGenerator.cs | New Node.js Winston generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/RedisNodeJsGreenfieldGenerator.cs | New Node.js Redis generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/PostgresNodeJsGreenfieldGenerator.cs | New Node.js Postgres generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/NextJsGreenfieldGenerator.cs | New Next.js generator (instrumentation hook + next.config.js guidance). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/NestJsGreenfieldGenerator.cs | New NestJS generator (tracing.ts + first-import guidance). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/MySQLNodeJsGreenfieldGenerator.cs | New Node.js MySQL generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/MongoDBNodeJsGreenfieldGenerator.cs | New Node.js MongoDB generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/LangchainJsGreenfieldGenerator.cs | New LangChain.js generator (ESM/CJS handling). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/FastifyGreenfieldGenerator.cs | New Fastify generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/ExpressGreenfieldGenerator.cs | New Express generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/DotNetEnhancementGenerator.cs | New .NET enhancement generator + supported enhancement catalog. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/ConsoleNodeJsGreenfieldGenerator.cs | New Node.js console generator (applicationinsights fallback). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/BunyanNodeJsGreenfieldGenerator.cs | New Node.js Bunyan generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/AspNetClassicGreenfieldGenerator.cs | New classic ASP.NET greenfield generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/AspNetClassicBrownfieldGenerator.cs | New classic ASP.NET brownfield migration generator. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/PythonLanguageDetector.cs | New Python language detector. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/PythonAppTypeDetector.cs | New Python app-type detector (framework/genai heuristics). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/NodeJsLanguageDetector.cs | New Node.js language detector. |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/NodeJsInstrumentationDetector.cs | New Node.js instrumentation detector (package.json heuristics). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/NodeJsAppTypeDetector.cs | New Node.js app-type detector (dependency heuristics). |
| tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/DotNetInstrumentationDetector.cs | Enhances .NET detector with packages.config scanning + target-version detection. |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/SendEnhancedSelectionCommand.cs | New command for enhancement selection submission. |
| tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/SendBrownfieldAnalysisCommand.cs | Passes logging findings through to tool submission. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Adds enhanced selection tool to the monitor instrumentation “guide” tool mapping. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds E2E prompts for monitor_instrumentation_send_enhanced_selection. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents send_enhanced_selection usage and expectations. |
| servers/Azure.Mcp.Server/changelog-entries/1773863632737.yaml | Updates changelog entry metadata (currently invalid pr format). |
...s/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/WorkerServiceGreenfieldGenerator.cs
Show resolved
Hide resolved
...s/Azure.Mcp.Tools.Monitor/src/Instrumentation/Generators/WorkerServiceGreenfieldGenerator.cs
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Monitor/src/Commands/Instrumentation/SendEnhancedSelectionCommand.cs
Outdated
Show resolved
Hide resolved
...Azure.Mcp.Tools.Monitor/src/Instrumentation/Resources/examples/dotnet/workerservice-setup.md
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Monitor/src/Instrumentation/Detectors/NodeJsInstrumentationDetector.cs
Outdated
Show resolved
Hide resolved
rajkumar-rangaraj
approved these changes
Mar 20, 2026
chidozieononiwu
approved these changes
Mar 20, 2026
- Add nuget-vs package manager case with Install-Package command and Package Manager Console instructions for classic ASP.NET scenarios - Add XML config file handling in AddConfig (ApplicationInsights.config, Web.config) instead of always emitting JSON instructions - Restore detailed BuildAnalysisInstruction with per-section guidance for brownfield analysis (AAD auth, telemetry types, Activity.Current) - Update AnalysisTemplate placeholders with comprehensive examples (all Track methods, IConfigureOptions, AAD auth mentions) - Restore BuildValidateInstallInstructions with FilesToExist and FileContentChecks support for validate-install actions - Add missing middleware telemetry access and manually-constructed telemetry object sections to migration doc
…fixes-remaining Sync missing logic from standalone instrumentation MCP server
rajkumar-rangaraj
approved these changes
Mar 20, 2026
srnagar
reviewed
Mar 20, 2026
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.
What does this PR do?
[Provide a clear, concise description of the changes]Support more languages and frameworks for the Monitor Instrumentation tool
[Any additional context, screenshots, or information that helps reviewers]Azure Monitor Instrumentation in the Monitor tool now supports guided onboarding for .NET, Node.js, and Python workloads, with framework-aware recommendations and code/package actions. Supported targets include ASP.NET Core, Worker Service, ASP.NET classic (including MVC/WebForms), Express, Fastify, NestJS, Next.js, LangChain.js, Node.js database/logging variants (Postgres, MongoDB, Redis, MySQL, Winston, Bunyan, console), and Python frameworks/apps (Django, Flask, FastAPI, Falcon, Starlette, GenAI, and generic console/script apps). .NET also supports brownfield migration guidance for Application Insights SDK to 3.x and enhancement flows for projects already on Application Insights 3.x or Azure Monitor Distro.
GitHub issue number?
[Link to the GitHub issue this PR addresses]#1801
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.jsonbreaking-changelabel/servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline