From 82a09594530551cc5b586f9c7936cff2576bdcb7 Mon Sep 17 00:00:00 2001 From: alliscode Date: Mon, 20 Apr 2026 09:52:41 -0700 Subject: [PATCH 1/3] Bump preview version to 260420.1 and fix AgentServer package deps - Bump PackageVersion to 0.0.1-preview.260420.1 - Bump Azure.AI.AgentServer.Core beta.21 -> beta.22 (required by Azure.AI.AgentServer.Responses beta.3) - Replace AgentHostTelemetry.ResponsesSourceName with local constant (type made internal in AgentServer.Core beta.22) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/Directory.Packages.props | 6 +++--- dotnet/nuget/nuget-package.props | 2 +- .../Hosting/ServiceCollectionExtensions.cs | 9 ++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index ce1bbffa0a..1f7a9a6f3b 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -19,9 +19,9 @@ - + - + @@ -193,4 +193,4 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/dotnet/nuget/nuget-package.props b/dotnet/nuget/nuget-package.props index 55e676470c..5169aae04f 100644 --- a/dotnet/nuget/nuget-package.props +++ b/dotnet/nuget/nuget-package.props @@ -4,7 +4,7 @@ 0.0.1 1 - $(VersionPrefix)-preview.260417.2 + $(VersionPrefix)-preview.260420.1 0.0.1 Debug;Release;Publish diff --git a/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/ServiceCollectionExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/ServiceCollectionExtensions.cs index 73d032f13b..0cfbf7a40e 100644 --- a/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/ServiceCollectionExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/ServiceCollectionExtensions.cs @@ -117,6 +117,13 @@ public static IEndpointRouteBuilder MapFoundryResponses(this IEndpointRouteBuild return endpoints; } + /// + /// The ActivitySource name for the Responses hosting pipeline. + /// Matches the value previously exposed by AgentHostTelemetry.ResponsesSourceName + /// in Azure.AI.AgentServer.Core. + /// + private const string ResponsesSourceName = "Azure.AI.AgentServer.Responses"; + /// /// Wraps with instrumentation /// so that agent invocations emit spans into the pipeline registered by @@ -131,7 +138,7 @@ internal static AIAgent ApplyOpenTelemetry(AIAgent agent) } return agent.AsBuilder() - .UseOpenTelemetry(sourceName: AgentHostTelemetry.ResponsesSourceName) + .UseOpenTelemetry(sourceName: ResponsesSourceName) .Build(); } From 5bdc1c32cb46e066b7d3516d46805a9f6984d162 Mon Sep 17 00:00:00 2001 From: alliscode Date: Mon, 20 Apr 2026 15:31:20 -0700 Subject: [PATCH 2/3] Fix CA1873: guard LogError with IsEnabled check in FoundryToolboxService Wrap the LogError call with an IsEnabled(LogLevel.Error) guard to satisfy the CA1873 analyzer rule which flags potentially expensive argument evaluation when logging is disabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Hosting/FoundryToolboxService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/FoundryToolboxService.cs b/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/FoundryToolboxService.cs index 8ebde63879..aace2f723e 100644 --- a/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/FoundryToolboxService.cs +++ b/dotnet/src/Microsoft.Agents.AI.Foundry/Hosting/FoundryToolboxService.cs @@ -111,10 +111,13 @@ public async Task StartAsync(CancellationToken cancellationToken) } catch (Exception ex) when (ex is not OperationCanceledException) { - this._logger.LogError( - ex, - "Failed to connect to toolbox '{ToolboxName}'. Tools from this toolbox will not be available.", - toolboxName); + if (this._logger.IsEnabled(LogLevel.Error)) + { + this._logger.LogError( + ex, + "Failed to connect to toolbox '{ToolboxName}'. Tools from this toolbox will not be available.", + toolboxName); + } } } From e81bbf4b3531166298e36a174e69e3a6ba84defe Mon Sep 17 00:00:00 2001 From: alliscode Date: Mon, 20 Apr 2026 16:51:27 -0700 Subject: [PATCH 3/3] Bumping NuGet version --- dotnet/nuget/nuget-package.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/nuget/nuget-package.props b/dotnet/nuget/nuget-package.props index 5169aae04f..18b4b13247 100644 --- a/dotnet/nuget/nuget-package.props +++ b/dotnet/nuget/nuget-package.props @@ -4,7 +4,7 @@ 0.0.1 1 - $(VersionPrefix)-preview.260420.1 + $(VersionPrefix)-preview.260420.2 0.0.1 Debug;Release;Publish