Company
Date Published
Author
Abhijeet Prasad, Tim Fish
Word count
763
Language
English
Hacker News points
None

Summary

The Sentry team has implemented support for local variables in the Node.js SDK, allowing developers to include variable values in stack traces sent to Sentry, providing a closer debugging experience. This feature was made possible by leveraging Node's inspector API, which allows interaction with a running Node.js process and its environment, including the call stack, heap, and runtime information. The team has implemented a caching mechanism to ensure that local variables are attached to the correct error event, even when errors pass through the Sentry event pipeline before all variable values are returned. With this feature, developers can now reproduce issues locally with a debugger attached and have access to local variable data in their stack traces on Sentry events, making it easier to identify and fix reported errors.