From 52c27b6e6721813727e06afe01619404dcbfc7d7 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 7 Jul 2026 11:06:12 -0700 Subject: [PATCH] Use full Application Insights connection string instead of instrumentation key Backport of https://github.com/dotnet/sdk/pull/55127. Use the proper Application Insights connection string (including IngestionEndpoint, LiveEndpoint, and ApplicationId) instead of an instrumentation-key-only connection string. Resolving the endpoints from a bare instrumentation key requires an extra network round-trip; supplying the full connection string shaves 200+ms off the cost to POST telemetry. See https://github.com/dotnet/sdk/pull/55127 for motivation and measurements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Cli/dotnet/Telemetry/Telemetry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cli/dotnet/Telemetry/Telemetry.cs b/src/Cli/dotnet/Telemetry/Telemetry.cs index d9c3a59bd8a1..99c08e827791 100644 --- a/src/Cli/dotnet/Telemetry/Telemetry.cs +++ b/src/Cli/dotnet/Telemetry/Telemetry.cs @@ -21,7 +21,7 @@ public class Telemetry : ITelemetry private FrozenDictionary? _commonMeasurements = null; private Task? _trackEventTask = null; - private const string ConnectionString = "InstrumentationKey=74cc1c9e-3e6e-4d05-b3fc-dde9101d0254"; + private const string ConnectionString = "InstrumentationKey=74cc1c9e-3e6e-4d05-b3fc-dde9101d0254;IngestionEndpoint=https://southcentralus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://southcentralus.livediagnostics.monitor.azure.com/;ApplicationId=c5108c2c-b0c5-43c6-a703-424eae223a75"; public bool Enabled { get; }