Open
Conversation
11b393a to
2903de2
Compare
Type the connection reason/cause strings (ConnectionStateReason, ConnectionDropCause), have disconnect/scheduleReconnect own drop emission so the dedup flag and triple pre-call drops can go away, add an attempts measurement to the ssh discovery span, and extract the duplicated test telemetry helper.
2903de2 to
5e25405
Compare
The reconnect cycle was modeled as a Promise-backed trace with a NOOP_SPAN placeholder and synthetic Errors fed in to satisfy the trace contract. Switch to a plain field plus a single log() call at finish time, since the cycle is event-driven, not function-driven. Encapsulate the four-step process_changed handover as recordProcessReplaced, short-circuit network sampling before allocating a sample, and rename the shadowed internal options.reason to closeReason.
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.
Summary
Closes #905.
Validation
pnpm test:extension ./test/unit/remote/sshProcess.test.tspnpm test:extension ./test/unit/websocket/reconnectingWebSocket.test.tspnpm typecheckpnpm lintpnpm format:checkImplementation plan and decisions
Confirmed decisions:
CoderApiinstances; long-lived primary/remote clients receive telemetry.connection.openuses the sanitized route (pathname + search) rather than the full URL.DISCONNECTEDoutcomes as well as successful recovery.stale_network_info,missing_network_info,process_changed,disposed.derpuses thepreferred_derpstring, empty string if unavailable.Implemented:
SshProcessMonitor:ssh.process.discovered,ssh.process.lost,ssh.process.recovered, and sampledssh.network.info.ReconnectingWebSocket:connection.state_transition,connection.open,connection.drop, and aggregatedconnection.reconnect.Generated by Coder Agents.