[DATA-8187] fix(vscode): sample repetitive autocomplete failure telemetry - #14585
Merged
Merged
Conversation
pedroheyerdahl
marked this pull request as ready for review
September 25, 2026 18:38
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
approved these changes
Sep 29, 2026
This was referenced Sep 30, 2026
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.
Issue
No linked issue. This change reduces the number of autocomplete failure events sent to PostHog.
Context
Autocomplete sends an event for each failed request. Keep a random 10% of those failure events to reduce telemetry volume while keeping a sample for investigation. Successful completions and other events are still sent in full.
Implementation
The VS Code extension drops unselected
Autocomplete LLM Request Failedevents before sending them to the CLI. Selected events keep their existing properties and addautocomplete_failure_sample_rate: 0.1.This applies to inline autocomplete, chat-textarea autocomplete, and next-edit suggestions. Reports must multiply sampled failure counts by 10 when comparing them with completion counts. Events from older clients without the sample-rate property still count as 1 each. Dropped events cannot be inspected individually.
Screenshots / Video
Output from a local HTTP receiver using the actual extension telemetry proxy. The check used synthetic events, simulated VS Code telemetry consent, and fixed random values to make the result repeatable. The screenshot shows that output in Chrome.
How to Test
Local verification
Checked on September 25 at
69c72baf:git diff --checkpassed.Reviewer test steps
packages/kilo-vscode, runbun test tests/unit/telemetry-proxy-utils.test.ts.Checklist
Get in Touch
Follow up in this PR. Prepared with Codex; human review is pending.