Capture stack trace in additionalData struct#41
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds stack trace capture to the SentryAppender to improve error debugging in Sentry. The stack trace is now extracted from exception data and included in the additionalData structure when logging exceptions.
- Extracts stack trace from extraInfo when present and includes it in additionalData
- Handles both direct exception logging and nested exception structures
- Ensures stack trace information is preserved for Sentry visualization
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| getProperty( "sentryService" ).captureException( | ||
| exception = extraInfo.exception, |
There was a problem hiding this comment.
The additionalData parameter is missing from this captureException call. The trimmedExtra struct (which now includes the stacktrace) should be passed as additionalData to maintain consistency with the first exception handling path.
boxlang@1 ColdBox be Test Results10 tests ±0 5 ✅ ±0 0s ⏱️ -3s For more details on these errors, see this check. Results for commit 7bb8046. ± Comparison against base commit 480d1bf. |
|
This one is actually resolved by adding the setting |
|
Thanks for the update, @jclausen! I'm just happy to have a way to send the stack trace to Sentry. |
Description
The caught exception is not showing the stack trace in Sentry. Save the stack trace under
additionalDataso it will at least render in Sentry as a string.Issues
https://ortussolutions.atlassian.net/browse/BOX-160
Type of change
Please delete options that are not relevant.
Checklist