From cd1fd8254f1a13166363b8eb073cb27c0d87fb8f Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Tue, 7 Jul 2026 11:08:27 -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> (cherry picked from commit e17b6fc55793dc4c64ff0cd1e7a26a813d1283ce) --- 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 96f7491f65c9..8792e732e6ad 100644 --- a/src/Cli/dotnet/Telemetry/Telemetry.cs +++ b/src/Cli/dotnet/Telemetry/Telemetry.cs @@ -20,7 +20,7 @@ public class Telemetry : ITelemetry private Dictionary _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; }