Repository navigation
Replace startup workspace file scan with opened-file telemetry - #5083
Merged
Vidal Ortega (vidorteg) merged 5 commits intoNov 2, 2026
Merged
Conversation
Contributor
Author
|
Copilot resolve the merge conflicts in this pull request |
…file-type-telemetry # Conflicts: # package-lock.json Co-authored-by: vidorteg <43078681+vidorteg@users.noreply.github.com>
Resolved in 973a82f by merging |
There was a problem hiding this comment.
🟡 Changes recommended
The tracker misses documents opened before listener registration, and shutdown reporting can lose pending telemetry because the reporter’s buffered transport is not flushed.
2 open issues
What changed in this PR
Replaces startup workspace scanning with opened-file telemetry to address memory exhaustion and VS Code crashes reported in #4970.
Changes:
- Counts unique opened files by type, filtering out
.gitcontents and unsupported document schemes. - Batches counts after 30 seconds of inactivity and reports pending counts when the tracker is disposed.
- Updates tests and mocks for event-driven tracking; also downgrades the locked
undicidependency.
| File | Description |
|---|---|
test/utils.test.ts |
Tests batching, deduplication, filtering, and disposal. |
test/helpers/helpers.ts |
Adds document-open and disposable mocks. |
test/extension.test.ts |
Updates tracker mocks and subscription expectations. |
src/utils.ts |
Replaces workspace scanning with opened-file tracking. |
src/extension.ts |
Registers the tracker as an extension subscription. |
package-lock.json |
Downgrades undici from 6.29.1 to 6.28.0. |
Review effort: Balanced
Guangyue Xu (guangyuexu)
approved these changes
Nov 2, 2026
Vidal Ortega (vidorteg)
deleted the
user/vidorteg/update-file-type-telemetry
branch
November 2, 2026 21:37
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.

Fixes #4970. On startup the extension scanned the workspace to report telemetry, which could exhaust memory and crash VS Code on large or remote workspaces.
The scan is removed. Instead, the extension listens for files the user opens and counts them by type (each file once, ignoring
.gitand non-file documents).Counts are sent in a single batched telemetry event (
fileOpened) after 30 seconds of inactivity or when the extension shuts down.This helps to improve and prioritze supported tools based on file format