entropic-dev / entropic-dev/boltzmann

Graceful Exit Handling

Open
#110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

An earlier cut of #101 had a bunch of hooks on events like `unhandledRejection` which attempted to gracefully shut down tracing before an exit. However, there are a few problems with this:

1. Boltzmann today doesn't do anything like this - if we were to handle those cases for honeycomb, we would need to handle them for non-honeycomb cases too, and doing so would be a major-version API change
2. At least some of the events handle async actions poorly - we would need to research this and figure out what's realistically possible.

Our current approach for #101 is to only listen for the `onExit` event, which should fire on a non-error exit. This should get us graceful shutdown in the event of a service roll. If the app hard crashes we may lose some trace data, but if that's the case we have bigger problems which will surface themselves through on-call incidents. This approach is acceptable for now, but following up on this behavior later - in both honeycomb and non-honeycomb cases - could be worthwhile.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.