Skip to content

Flush log buffer in base Client.close() #19347

Description

@sergical

Problem

When client.close() is called, the log buffer is not flushed. The close() method in platform SDKs (node-core, deno) only removes the exit event listener but doesn't call _INTERNAL_flushLogsBuffer(this). This means pending logs can be lost if someone explicitly closes the client.

Proposed Solution

Add _INTERNAL_flushLogsBuffer(this) to the base Client.close() in packages/core/src/client.ts so all SDKs benefit automatically, rather than fixing it in each platform SDK individually.

References

Activity

  1. linear commented on Feb 16, 2026

    @linear
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Feb 16, 2026
  3. Lms24 commented on Feb 17, 2026

    @Lms24
    Member

    closing via #19313

    EDIT: reopened, I misread the PR

  4. reopened this on Feb 17, 2026
  5. self-assigned this
    on Feb 18, 2026
  6. github-actions commented on Feb 24, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #19371, which was included in the 10.40.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions