Skip to content

Fix telemetry collection for remote server mode#1602

Merged
srnagar merged 3 commits intomicrosoft:mainfrom
srnagar:telemetry-remote-fix
Jan 28, 2026
Merged

Fix telemetry collection for remote server mode#1602
srnagar merged 3 commits intomicrosoft:mainfrom
srnagar:telemetry-remote-fix

Conversation

@srnagar
Copy link
Copy Markdown
Member

@srnagar srnagar commented Jan 28, 2026

This pull request simplifies the logic for enabling telemetry in the service configuration. Now, telemetry is enabled or disabled solely based on the AZURE_MCP_COLLECT_TELEMETRY environment variable, regardless of the transport type.

Configuration simplification:

  • The logic that previously checked the transport type (e.g., stdio vs. http) to determine whether telemetry should be enabled has been removed; telemetry is now controlled only by the AZURE_MCP_COLLECT_TELEMETRY environment variable.

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 simplifies telemetry enablement so that it is controlled solely by the AZURE_MCP_COLLECT_TELEMETRY environment variable, independent of the server transport type. This aligns remote server (HTTP) mode with stdio mode, except when support logging explicitly disables telemetry.

Changes:

  • Removed transport-based conditional logic from InitializeConfigurationAndOptions that previously disabled telemetry for HTTP transport.
  • Set AzureMcpServerConfiguration.IsTelemetryEnabled directly from AZURE_MCP_COLLECT_TELEMETRY (defaulting to true) whenever support logging is not enabled.

Copy link
Copy Markdown
Member

@joshfree joshfree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a CHANGELOG.md entry

@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Jan 28, 2026
@joshfree joshfree added this to the 2026-02 milestone Jan 28, 2026
@srnagar srnagar enabled auto-merge (squash) January 28, 2026 20:16
@srnagar srnagar merged commit 840250b into microsoft:main Jan 28, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Jan 28, 2026
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Apr 20, 2026
* Fix telemetry collection for remote server mode

* update unit test

* changelog
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