Repository navigation
feat: name the class of a failed device connection in its usage event - #2172
Merged
Merged
Conversation
A failed hide_device_connected said only install or download, so the 17 installations that never connected a device could not be told apart. The event now adds failure, a closed class: the device row's ssh classification (ssh_unreachable, ssh_sign_in_refused, ...) or the step that failed (no_transport, helper_lost, kit_failed, ...). The error's text stays in the local log, since it carries host names, addresses and paths.
yansfil
enabled auto-merge
November 6, 2026 15:14
yansfil
disabled auto-merge
November 6, 2026 15:17
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.
Related: #2170 (이 PR의 base, 먼저 머지)
Summary
기기 연결 실패 이벤트가
install/download단계만 알려 줘서, 기기를 한 번도 연결하지 못한 설치본 17대가 왜 실패했는지 PostHog로 알 수 없었습니다.이제 실패 이벤트에
failure속성을 붙입니다: 기기 행이 이미 쓰는 SSH 분류(ssh_unreachable,ssh_sign_in_refused,ssh_host_key_changed등 13가지)나 실패한 단계(no_transport,helper_lost,kit_refused,kit_failed등).닫힌 목록만 보내고 오류 원문은 보내지 않습니다: 원문에는 호스트 이름, 주소, 경로가 들어 있어 로컬 로그에만 남습니다.
스크린샷 없음: 화면이 아닌 사용 통계 전송만 바뀝니다.
Review
failure(닫힌 분류)가 하나 늘어납니다. 안내 문서를 고쳐야 하는지.failed_step은 PostHog의 기존 대시보드를 위해 남겼고, 이제failure에서 계산됩니다(download만download, 나머지는install).herdr-core/src/product_analytics.rs- 전송 어휘의 유일한 주인. SSH 분류는SshProblem을 match로 하나씩 적어서, 분류가 늘면 컴파일이 막힙니다.herdr-core/src/runtime/device_analytics.rs,hosts.rs,devices.rs,kit.rs- 실패 경로마다 분류를 붙였습니다. 이유가 다르면 #2170의 "같은 결과는 한 번만" 비교에서도 다른 결과로 셉니다.Evidence
a_device_failure_names_its_class_and_never_its_text(전송 속성), 꺼진 기기 재시도 테스트가ssh_unreachable실패 한 건만 보냄, SSH 설정에 없는 별칭 등록은no_transport, 키트 실패는kit_failed. herdr-core device/analytics 테스트 312개와 hided analytics 테스트 2개 통과, fmt-check, clippy-D warnings(herdr-core, hided) 통과.failure별 분포를 보면 됩니다.Verification record
5c0530a87(fix: send a device connection outcome only when it changes #2170 head), head:2f3a3ae82scripts/verify-cargo.sh nextest -p herdr-core --lib -E 'test(/device/) | test(/analytics/)': 312 passedscripts/verify-cargo.sh nextest -p hided -E 'test(/analytics/)': 2 passedscripts/verify-cargo.sh fmt-check,clippy -p herdr-core -p hided --all-targets -- -D warnings: pass