Skip to content

Buffer TypeScript SDK logs across log socket disconnects#69302

Open
guan404ming wants to merge 1 commit into
apache:mainfrom
guan404ming:worktree-ts-log-buffering
Open

Buffer TypeScript SDK logs across log socket disconnects#69302
guan404ming wants to merge 1 commit into
apache:mainfrom
guan404ming:worktree-ts-log-buffering

Conversation

@guan404ming

Copy link
Copy Markdown
Member

Related Issue

closes: #69292

Why

Logs emitted while the log socket is disconnected are silently lost, unlike the Java and Go SDK runtimes which buffer and flush them.

How

  • Buffer serialized log records while the socket is down and flush them in order on reconnect
  • Reconnect automatically every 250ms after an unexpected socket close, stopping on close()
  • Share socket state between the root logger and its children so all observe the same connection

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
@guan404ming guan404ming marked this pull request as ready for review July 3, 2026 10:31
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.

TypeScript SDK: log socket buffering and reconnect hardening

1 participant