Repository navigation
Description
Summary
On Linux, every dotnet command under SDK 11.0.100 RC2 and RC3 takes about 2 seconds longer than it should, including dotnet --version. The CLI telemetry exporter requests Azure VM metadata from 169.254.169.254 and waits for that request to time out before the process exits. On a machine that isn't an Azure VM, that address is routed through the default gateway, which silently drops it, so every command pays the full timeout.
SDK 10.0.402 on the same machine is not affected. Setting DOTNET_CLI_TELEMETRY_OPTOUT=1 removes the delay.
Environment
- Ubuntu 26.04.1 LTS, x64 (
linux-x64) - SDK
11.0.100-rc.3.26522.148and11.0.100-rc.2.26504.105, compared with10.0.402, each selected with aglobal.jsonpin - No
OTEL_*,APPLICATIONINSIGHTS_*orDOTNET_CLI_TELEMETRY_*variables set except where the table says so - An ordinary home network:
ip route get 169.254.169.254resolves through the default gateway; there's no link-local route
Reproduction
time dotnet --version| Configuration | Wall time |
|---|---|
| SDK 10.0.402, default | 0.06 s |
| SDK 11.0.100-rc.2.26504.105, default | 2.02 s |
| SDK 11.0.100-rc.3.26522.148, default | 2.02 s |
RC3, DOTNET_CLI_TELEMETRY_OPTOUT=1 |
0.01 s |
RC3, DOTNET_CLI_TELEMETRY_SHUTDOWN_TIMEOUT_MS=0, 100 or 500 |
2.02 s |
RC3, APPLICATIONINSIGHTS_STATSBEAT_DISABLED=true |
2.02 s |
RC3, telemetry on, connections to 169.254.169.254 refused immediately (LD_PRELOAD shim on connect) |
0.02 s |
The time is spent waiting, not computing: real 2.03s, user 0.03s.
What the trace shows
strace -f -tt -e trace=connect,sendto,exit_group dotnet --version with RC3, times relative to the first connection:
- +0.00 s:
connectto::ffff:169.254.169.254port 80 returnsEINPROGRESSand never completes. - +0.05 s:
connectto the Application Insights ingestion endpoint on port 443; the TLS handshake completes and the telemetry payload is sent by +0.68 s. - +0.87 s: a second
connectto::ffff:169.254.169.254port 80. - +2.00 s:
exit_group(0).
The process exits 2.00 s after the first metadata request, long after the telemetry upload has finished.
The address appears in the SDK's Azure.Monitor.OpenTelemetry.Exporter.dll as http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json. The SDK's Microsoft.Identity.Client.dll and Azure.Core.dll also contain IMDS endpoints, but the CLI configures the exporter with a connection string, so I believe the exporter's VM metadata lookup is the request being made. Refusing that address in a preload shim, with nothing else changed, brings the command from 2.02 s to 0.02 s.
Expected behavior
A CLI command shouldn't wait on cloud-VM detection. Skipping the VM metadata lookup in the CLI's exporter configuration, or not blocking process exit on it, would remove the delay for anyone whose network drops packets to 169.254.169.254 rather than rejecting them.
Related
- All
dotnetcommand takes ~4.4s on .NET 11 preview 4 (Windows) #54282: the same symptom on Windows with preview 4, caused by the OTLP exporter and fixed by disabling it by default in Disable AddOtlpExporter by default; opt-in via DOTNET_CLI_TELEMETRY_ENABLE_EXPORTER #54193. The OTLP exporter isn't involved here: the trace shows no connection to a local collector. OpenTelemetrywithAzure Monitor Exporterseems to not be designed forCLIApplications #55184: discussion of the Azure Monitor exporter's fit for short-lived CLI processes.
Activity
github-actions commentedon Nov 4, 2026
🎯 Agentic Issue Triage
Triage Assessment:
@dotnet/dotnet-climedium- Telemetry area fits, but CODEOWNERS has no Area-Telemetry section, so routing falls back to the default team.Similar issues: #54282 (
potentially related) #55184 (potentially related)➡️ Summary: On Linux, SDK 11 RC2/RC3 commands wait about 2 seconds on the telemetry exporter's Azure VM metadata request to 169.254.169.254. Consider disabling VM metadata detection in the exporter or not blocking exit on it.
martincostello commentedon Nov 4, 2026
I think this is already fixed for 11.0.0: #56863
baronfel commentedon Nov 4, 2026
Yep! We should be all clear.