Report ssh_tunnel_event booleans explicitly in telemetry - #6338
Open
anton-107 wants to merge 1 commit into
Open
Conversation
The bool fields on SshTunnelEvent carried `omitempty`, which drops the zero value. A failed connection therefore sent no `is_success` field at all and landed in the telemetry table as NULL rather than false, so filtering on `is_success = false` returned zero rows across all history while the real IDE-mode failure rate was 40-55%. Drop `omitempty` from all five bools. Every one is populated unconditionally in buildSshTunnelEvent, so each has a meaningful false: IsReconnect, AutoStartCluster, HasBaseEnvironment and HasUsagePolicy were equally unrepresentable and matter for funnel analysis. ServerStartTimeMs already omitted the tag, which is what confirmed this was a field-level mistake. Historical rows cannot be backfilled, so the struct comment records the cutover: queries spanning it must count NULL as false. Co-authored-by: Isaac
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 2dc338b
Top 6 slowest tests (at least 2 minutes):
|
rugpanov
approved these changes
Aug 21, 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.
Changes
Drop
omitemptyfrom all fiveboolfields onSshTunnelEvent(
libs/telemetry/protos/ssh_tunnel.go):IsSuccess,IsReconnect,AutoStartCluster,HasBaseEnvironment,HasUsagePolicy.Why
omitemptydrops the zero value, so a failedssh connectsent nois_successfield at all and landed in the telemetry table as NULL rather than
false.Filtering on
is_success = falsereturned zero rows across all history — anystraightforward "are users hitting errors?" query reported a clean bill of health
while the real IDE-mode failure rate was 40-55%.
All five bools are populated unconditionally in
buildSshTunnelEvent, so eachhas a meaningful
false. The other four were equally unrepresentable and matterfor funnel analysis, so they are fixed in the same pass rather than left to be
rediscovered.
ServerStartTimeMsin the same struct already omitted the tag,which is what confirmed this was a field-level mistake rather than an intended
encoding.
Historical rows cannot be backfilled, so the struct doc comment records the
cutover: queries spanning it must count NULL as failure for pre-fix data.
No changelog fragment —
experimental/changes don't get one until the featuregraduates, and the payload isn't user-visible.
Tests
libs/telemetry/protos/ssh_tunnel_test.go: pins the zero-value wirepayload, plus a reflection guard that fails if a future
boolon this structarrives with
omitempty.TestBuildSshTunnelEventReportsFailurecovers the failure path inexperimental/ssh/internal/client; the existing table test only ever passedtrue.actual: <nil>— the exact NULL this fixes.FrontendLogenvelope as uploaded to/telemetry-ext:"is_success": falseis now transmitted.task lint-go(0 issues, all 3 modules),task test-exp-ssh, telemetry andssh acceptance tests pass. One pre-existing failure in
bundle/templates/lakeflow-integrations, unrelated: it fails identically onunmodified
origin/main(blocked PyPI fetch in my sandbox).This PR was written by Claude Code.