Skip to content

Fix App Lens serialization#639

Merged
alzimmermsft merged 4 commits intomicrosoft:mainfrom
alzimmermsft:FixAppLensSerialization
Oct 1, 2025
Merged

Fix App Lens serialization#639
alzimmermsft merged 4 commits intomicrosoft:mainfrom
alzimmermsft:FixAppLensSerialization

Conversation

@alzimmermsft
Copy link
Copy Markdown
Contributor

@alzimmermsft alzimmermsft commented Sep 30, 2025

What does this PR do?

Fixes #620

Fixes a serialization issue when using AoT builds of Azure MCP where App Lens would attempt to use reflection-based serialization. This is resolved by configuring HubConnection with a type info resolver of the types defined in the App Lens tools.

GitHub issue number?

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
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • 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 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 /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

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 fixes a serialization issue in the Azure MCP's App Lens tool when using AoT (Ahead of Time) builds. The change ensures proper JSON serialization by configuring the SignalR HubConnection with a specific type info resolver instead of relying on reflection-based serialization.

Key changes:

  • Configures SignalR HubConnection with AppLensJsonContext.Default type info resolver for AoT compatibility
  • Adds necessary using statements for SignalR and dependency injection

Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs Outdated
@joshfree
Copy link
Copy Markdown
Member

@alzimmermsft add a changelog entry for the product bug fix please

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

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

Comment thread tools/Azure.Mcp.Tools.AppLens/src/Services/AppLensService.cs
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Sep 30, 2025
@alzimmermsft alzimmermsft merged commit 422637f into microsoft:main Oct 1, 2025
23 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Oct 1, 2025
@alzimmermsft alzimmermsft deleted the FixAppLensSerialization branch October 1, 2025 16:56
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Dec 8, 2025
* Fix App Lens serialization

* Add CHANGELOG entry
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.

App Lens diagnostics fails with internal error (500) when diagnosing app issues

4 participants