Repository navigation
fix: memory leak in extension host telemetry - #334096
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits intoSep 28, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Conversation
Copilot started reviewing on behalf of
Simon Siefke (SimonSiefke)
September 2, 2026 19:36
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A throwing sender flush() can still prevent bookkeeping cleanup and retain the logger.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes a memory leak by removing disposed telemetry loggers from extension-host bookkeeping.
Changes:
- Removes loggers from their extension map upon disposal.
- Adds regression coverage for logger cleanup.
- Cleanup must use
finallyso a throwingflush()cannot prevent removal.
File summaries
| File | Description |
|---|---|
src/vs/workbench/api/common/extHostTelemetry.ts |
Adds disposal-driven removal; the synchronous flush() exception path remains unresolved. |
src/vs/workbench/api/test/browser/extHostTelemetry.test.ts |
Tests logger and map-entry cleanup. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Aaron Munger (amunger)
previously approved these changes
Sep 18, 2026
Dmitriy Vasyura (dmitrivMS)
requested changes
Sep 18, 2026
Dmitriy Vasyura (dmitrivMS)
left a comment
Collaborator
There was a problem hiding this comment.
Please take a look at feedback.
Copilot started reviewing on behalf of
Dmitriy Vasyura (dmitrivMS)
September 28, 2026 05:17
View session
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 28, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 28, 2026 05:43
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Martin Aeschlimann (aeschli)
approved these changes
Sep 28, 2026
Christof Marti (chrmarti)
approved these changes
Sep 28, 2026
Ladislau Szomoru (lszomoru)
approved these changes
Sep 28, 2026
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-extHostTelemetry
branch
September 29, 2026 11:15
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Oct 1, 2026
* fix: memory leak in extHostTelemetry * fix: ensure telemetry cleanup when flush throws * Fix telemetry logger replacement during enablement notifications --------- Co-authored-by: Aaron Munger <2019016+amunger@users.noreply.github.com> Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com> (cherry picked from commit 0c86455)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Details
When an extension creates a telemetry logger, the extension host adds it to the extension's logger list. Disposing the logger clears its sender, but does not remove it from that list.
Change
Remove disposed telemetry loggers from the extension host logger list.
Before
When a telemetry logger is created and disposed 37 times,
ExtHostTelemetryLoggerand its API getters grow by 37:After
No more extension host telemetry logger leak is detected.
Test Video
test-video.webm