Skip to content

Conversation

@yamadapc
Copy link

@yamadapc yamadapc commented Jul 30, 2025

If the client SDK is used on a server environment enabling event logging causes processes to hang indefintely.

This is due to the setInterval call in EventLogger stopping Node.js from exiting.

This diff adds a Timeout::unref call in the EventLogger so processes can exit normally.

Events can be flushed by adding a beforeExit hook and handling termination. There might be another similar problem on the network code as trying to flush on a beforeExit hook also causes processes to hang.

🧵 Slack thread

If the client SDK is used on a server environment enabling event logging causes
processes to hang indefintely.

This is due to the `setInterval` call in `EventLogger` stopping Node.js from
exiting.

This diff adds a `Timeout::unref` call in the `EventLogger` so processes can
exit normally.

Events can be flushed by adding a `beforeExit` hook and handling termination.
There might be another similar problem on the network code as trying to flush
on a beforeExit hook also causes processes to hang.
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