inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
440 stars 43 forks source link

Save and pull `stack` on entrypoints #531

Open jpwilliams opened 7 months ago

jpwilliams commented 7 months ago

Summary

When the library emits a log to try and help the user diagnose or resolve an issue, we usually include a stack trace in order to provide them with a location to start the investigation.

More often than not, however, this stack trace is loaded with internal calls, flowing in and out of async, or other calls in the user's application.

image

On every entrypoint via userland code, we should store a stack trace ahead of time, such that any logs emitted to users via prettyError() can be attributed to those traces instead of our internal ones.

linear[bot] commented 7 months ago

INN-2892 Save and pull `stack` on entrypoints