Repository navigation
feat(telemetry): record interrupts as cancelled, add ci_provider and is_wsl, send cli_version with every event - #1737
Draft
Lena Forlin (moshimorschi) wants to merge 1 commit into
Draft
Lena Forlin (moshimorschi) wants to merge 1 commit into
Lena Forlin (moshimorschi) wants to merge 1 commit into
Conversation
…is_wsl, send cli_version with every event A run stopped with Ctrl+C or SIGTERM counted as a failure whenever the command returned its child's exit error instead of the context error; the tracker now also looks at the interrupted context. The command event gains ci_provider (github, gitlab, bitbucket, other; absent outside CI) and is_wsl. Track adds cli_version to every event that does not set it, so Dev TUI events can exclude dev builds too.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1737 +/- ##
==========================================
+ Coverage 66.50% 66.52% +0.01%
==========================================
Files 479 479
Lines 32539 32549 +10
==========================================
+ Hits 21641 21652 +11
+ Misses 10898 10897 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Lena Forlin (moshimorschi)
requested a review
from Tomasz Turkowski (tturkowski)
October 26, 2026 15:13
This branch has not been deployed
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.
What changed?
Four small telemetry changes to the command event and the shared tracking code. No event name changes, so the telemetry pipeline's allow-list stays as it is.
cancelled. Until now a run stopped with Ctrl+C or SIGTERM counted asfailurewhenever the command returned its child process's exit error instead of the context error, which is what the watcher commands do. The tracker now also looks at the interrupted context. A run that still finished successfully stayssuccess.ci_providertag on the command event.github,gitlaborbitbucket;otherwhen CI is detected without a known provider; no tag at all outside CI.is_wsltag on the command event.truewhen a Linux run happens inside the Windows Subsystem for Linux,falseotherwise, using the WSL detection the proxy code already has.cli_versionon every event. The sharedTrackfunction adds it to any event that does not set it, on a copy of the caller's tags, so the Dev TUI events carry it too. An explicitly set value wins.Tags of a command event after this change, captured from the built binary with a local UDP listener and shortened. The first run is a developer machine, the second the same run with the GitHub Actions variable set:
{"command_name": "extension.validate", "result": "failure", "cli_version": "dev", "os": "linux", "is_tui": "false", "is_wsl": "false"} {"command_name": "extension.validate", "result": "failure", "cli_version": "dev", "os": "linux", "is_tui": "false", "is_wsl": "false", "ci_provider": "github"}docs/TELEMETRY.mddocuments the two tags, the result rule and the version on every event.Why?
These are the four smallest items of the telemetry improvements the DX tools team is working through. The data could not tell CI runs from people, could not separate WSL from native Linux, counted Ctrl+C on long-running commands as failures, and could not exclude dev builds from Dev TUI events because those carried no version.
Two effects to expect in the dashboards once a release with this change is in use: failure rates of the watcher commands drop, because interrupted runs no longer count as failures, and Dev TUI events can be filtered by
cli_versionlike the command event.How was this tested?
Trackpath.project consolewith a PHP child received a terminal-style SIGINT to its whole process group, onmainand on this branch. Both recordedcancelled, so that command already wrapped the cancellation. The watcher commands, where the old classification was wrong, need a full shop with built assets to run and were not exercised; the unit test covers their case.Related issue or discussion
Part of the DX tools telemetry improvements. The Ctrl+C classification was already listed as a known trap in the team's telemetry analysis notes.