Skip to content

TypeScript SDK: log socket buffering and reconnect hardening #69292

Closed

Description

@jason810496

Background

The Java and Go SDK runtimes buffer logs while the log socket is not yet connected. The TypeScript coordinator runtime connects the log socket before runtime logs begin, which covers startup, but has no buffering for reconnect scenarios.

What needs to happen

  1. Add log buffering to the TypeScript runtime's log channel so logs emitted while the socket is disconnected (including reconnects) are held and flushed once connected, matching the Java and Go implementations.

Acceptance criteria

  • Logs emitted before connection or during a reconnect are not lost.

Context

Activity

  1. added
    type:improvement
    and removed
    kind:feature
    on Jul 3, 2026
  2. self-assigned this
    on Jul 3, 2026
  3. shivaam commented on Jul 9, 2026

    @shivaam
    Contributor

    @jason810496 I took a closer look at the TypeScript runtime startup order. TypeScript establishes the log socket before creating or using the runtime, comm, and client loggers. Most failures before that point, such as invalid arguments, bundle initialization failures, or failure to connect to the log socket, also mean there is no usable log connection. Those failures must go through stderr, which the coordinator already captures. Therefore, there are currently no LogChannel records waiting to be buffered before the initial connection.
    Once connected, Node already buffers ordinary socket writes internally when they cannot be sent immediately (Node documentation).

    fyi: @uranusjr

  4. moved this to Done in TS-SDKon Jul 20, 2026
  5. added this to the TS SDK 1.0 Beta milestone on Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions