Skip to content

[release/11.0.2xx] Do not delay exit waiting for telemetry - #56896

Merged
nagilson merged 1 commit into
release/11.0.2xxfrom
backport/pr-56863-to-release/11.0.2xx
Nov 2, 2026
Merged

nagilson merged 1 commit into
release/11.0.2xxfrom
backport/pr-56863-to-release/11.0.2xx

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Backport of #56863 to release/11.0.2xx

/cc @nagilson

Resolves #56815 (comment)

The initial fix was made in INTERNAL on dotnet/dotnet 11.0.100 for GA.

https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/authorize?client_id=499b84ac-1321-427f-aa17-267ca6975798&site_id=501454&response_mode=form_post&response_type=code+id_token&redirect_uri=https%3A%2F%2Fspsprodcus3.vssps.visualstudio.com%2F_signedin&nonce=6e955c3b-2d8e-4b63-a9e6-27ed4d3332c6&state=realm%3Ddev.azure.com%26reply_to%3Dhttps%253A%252F%252Fdev.azure.com%252Fdnceng%252Finternal%252F_git%252Fdotnet-dotnet%252Fpullrequest%252F67911%26ht%3D2%26protocol%3Dentra.web.3%26hid%3Db55de4ed-4b5a-4215-a8e4-0a0a5f71e7d8%26nonce%3D6e955c3b-2d8e-4b63-a9e6-27ed4d3332c6%26lltid%3D221510f4-2b26-40d5-988a-08b05ea44407&resource=499b84ac-1321-427f-aa17-267ca6975798&cid=6e955c3b-2d8e-4b63-a9e6-27ed4d3332c6&wsucxt=1&instance_aware=true

Scenario	Pre-patch	Post-patch
--version, default NativeAOT path	2.11 s	0.21 s
No-op build, managed CLI + MSBuild logger	8.76 s	4.52 s
Build telemetry overhead versus opt-out	5.05 s	0.91 s

The tracerProvider often get blocked on pending HTTP requests from recent Azure Monitor Exporter changes. It is supposed to be a minimal shutdown delay. Pending requests often take 3-5 seconds to complete, which results in extreme exit delay.

The MS Build logger telemetry client calls ForceFlush, which is why the additional change is needed. The defaultTimeout remains as 5 seconds, because it informs network timeout for HTTP requests in options.Retry.NetworkTimeout - since telemetry POST completion time is often around 3-5 seconds, setting this lower would drop telemetry.

--

The DIFFERENCE between this PR and what went into GA:
- Fixed a test only in dotnet/sdk
- I went from 10 to 100 ms because 10ms may not give enough time to write blob storage on slower disks for short lived commands

When merging, prefer these changes.
@github-actions github-actions Bot added the backport PR that has been backported to a servicing branch label Nov 2, 2026
@github-actions
github-actions Bot requested a review from a team as a code owner November 2, 2026 18:26
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@nagilson
nagilson requested a review from baronfel November 2, 2026 22:35
@nagilson
nagilson merged commit 55278e2 into release/11.0.2xx Nov 2, 2026
20 checks passed
@nagilson
nagilson deleted the backport/pr-56863-to-release/11.0.2xx branch November 2, 2026 22:35

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — a56d63ea Deployed Nov 2, 2026 by nagilson via pre_activation #11672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PR that has been backported to a servicing branch Servicing-approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant