Skip to content

Capture stack trace in additionalData struct#41

Closed
michaelborn wants to merge 1 commit into
developmentfrom
patch/add-stacktrace
Closed

Capture stack trace in additionalData struct#41
michaelborn wants to merge 1 commit into
developmentfrom
patch/add-stacktrace

Conversation

@michaelborn

@michaelborn michaelborn commented Sep 22, 2025

Copy link
Copy Markdown

Description

The caught exception is not showing the stack trace in Sentry. Save the stack trace under additionalData so 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.

  • Bug Fix

Checklist

  • My code follows the style guidelines of this project cfformat

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread models/SentryAppender.cfc
Comment on lines 74 to 75
getProperty( "sentryService" ).captureException(
exception = extraInfo.exception,

Copilot AI Sep 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown

lucee@5 ColdBox ^7.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

lucee@5 ColdBox ^6.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

lucee@5 ColdBox be Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

lucee@6 ColdBox be Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2018 ColdBox ^6.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2018 ColdBox ^7.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2021 ColdBox ^7.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

boxlang@1 ColdBox be Test Results

10 tests  ±0   5 ✅ ±0   0s ⏱️ -3s
 1 suites ±0   0 💤 ±0 
 1 files   ±0   0 ❌ ±0   5 🔥 ±0 

For more details on these errors, see this check.

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2023 ColdBox ^7.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2023 ColdBox be Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2021 ColdBox ^6.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2021 ColdBox be Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@github-actions

Copy link
Copy Markdown

adobe@2023 ColdBox ^6.0.0 Test Results

10 tests  ±0   10 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7bb8046. ± Comparison against base commit 480d1bf.

@jclausen

Copy link
Copy Markdown
Contributor

This one is actually resolved by adding the setting "showJavaStackTrace" : true to the module config. This isn't documented, however in the ModuleConfig.cfc file and is a bit confusion. It does default to false in Sentry service, but the module settings will pass through.

@jclausen jclausen closed this Nov 10, 2025
@michaelborn

Copy link
Copy Markdown
Author

Thanks for the update, @jclausen! I'm just happy to have a way to send the stack trace to Sentry.

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.

3 participants