diff --git a/core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs b/core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs index 8ebc179d8..206c51b7d 100644 --- a/core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs +++ b/core/Azure.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs @@ -130,10 +130,11 @@ public override async Task ExecuteAsync(CommandContext context, await InitializeServicesAsync(host.Services); + await host.StartAsync(CancellationToken.None); + var telemetryService = host.Services.GetRequiredService(); LogStartTelemetry(telemetryService, options); - await host.StartAsync(CancellationToken.None); await host.WaitForShutdownAsync(CancellationToken.None); return context.Response; diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 1a388904f..70158a066 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -12,6 +12,7 @@ The Azure MCP Server updates automatically by default whenever a new release com ### Bugs Fixed - Convert ARG usage to .NET SDK method calls of GetEntraAdministratorsAsync and ListFirewallRulesAsync to resolve the related issues ([#779](https://github.com/microsoft/mcp/issues/779) and [#855](https://github.com/microsoft/mcp/issues/855)) in `azmcp_entra_administrator_list` and `azmcp_sql_server_firewall_rule_list` commands. [[#891](https://github.com/microsoft/mcp/pull/891)] +- Fixed `ServerStarted` telemetry event not being published. [[#905](https://github.com/microsoft/mcp/pull/905)] ### Other Changes