Skip to content

WebSocket 전송 종료 진단 콜백 추가 - #8

Merged
hwisu merged 1 commit into
mainfrom
fix/websocket-transport-diagnostics
Oct 12, 2026
Merged

hwisu merged 1 commit into
mainfrom
fix/websocket-transport-diagnostics

Conversation

@hwisu

@hwisu hwisu commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

업그레이드된 WebSocket의 ping timeout은 HTTP 101로 끝나 애플리케이션의 HTTP 5xx 진단만으로 전송 상태와 정리 지연을 확인할 수 없었습니다. 선택적인 onTransportDiagnostic 콜백으로 연결 시작, 수신 루프 종료, 정리 완료 시점의 메타데이터를 전달합니다.

메시지 송수신 횟수·마지막 활동 시각, 송신 대기량·소요시간, 종료 코드, 오류 종류와 정리 시간을 기록할 수 있습니다. 원문 프레임·토큰·URL·문서명·close reason은 snapshot에 포함하지 않습니다. 콜백 실패를 격리하며 기존 timeout, 취소 전파, 자원 정리와 공개 serveHocuspocus 바이너리 인터페이스를 유지합니다. 5초 타이머 지연은 세션 coroutine 스케줄링의 표본이며 native ping/pong이나 Netty 이벤트 루프를 직접 측정한 값은 아닙니다.

Norric API가 고정한 bbd7a4ef에서 시작한 호환 패치입니다. 후속 버전 갱신 #9 에서 최신 main과 YKS 0.2.16을 함께 검증하며 API는 그 커밋을 고정합니다. https://github.com/norric-eng/norric-api/pull/975 및 https://github.com/norric-eng/ddq-client/pull/690 에서 같은 연결 시도 UUID로 로그를 연결합니다. 머지 순서는 이 PR, API PR이며 브라우저 PR은 독립적으로 적용할 수 있습니다.

검증: :hocuspocus-ktor:test :hocuspocus-ktor:updateAbi :hocuspocus-ktor:check 통과. 실제 Ktor 테스트 연결의 opened/ending/closed 순서, 진단 콜백 실패 격리, 원문 close reason 제외, 막힌 송신의 대기량과 종료 후 정리를 확인했습니다. PR 최신 커밋과 merge 기준 CI에서 전체 서비스·Provider 호환·성능·의존성·migration oracle 검사도 통과했습니다. 공유 Dev에서 장애를 재현하거나 배포하지 않았습니다.

@hwisu
hwisu marked this pull request as ready for review October 12, 2026 03:50
@hwisu
hwisu merged commit b56b3e0 into main Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant