Skip to content

feat: Add error cause detection #1531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

metal-messiah
Copy link
Member

Detect and report the cause attribute on captured JavaScriptError events. If the cause is an instance of an Error, the stack trace will be captured, otherwise the stringified contents of the cause will be reported. This will be queryable in JavaScriptError events under the attribute cause.

Overview

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-414116?atlOrigin=eyJpIjoiODY2NDUxZTIwMTUxNGQ0YWFkMDU0M2JmMDkxNzBkOWYiLCJwIjoiaiJ9

Testing

New tests have been added to validate the various cause cases.

Copy link

Supportability Metric Usage Changes:

No matching changes found

Supportability Metrics .md File Changes:

supportability_metrics.md was changed? false

New supportability metrics require changes to supportability_metrics.md, as well as a new PR to Angler. Please ensure an Angler PR is created and linked to this PR.

Copy link

github-actions bot commented Jul 24, 2025

Asset Size Report

Merging this pull request will result in the following asset size changes:

Agent Asset Previous Size New Size Diff
lite loader 25.57 kB / 9.64 kB (gzip) 25.57 kB / 9.64 kB (gzip) 0% / 0% (gzip)
lite async-chunk 54.16 kB / 17.89 kB (gzip) 54.16 kB / 17.89 kB (gzip) 0% / 0% (gzip)
pro loader 53.74 kB / 18.88 kB (gzip) 53.75 kB / 18.89 kB (gzip) 0.03% / 0.03% (gzip)
pro async-chunk 92.72 kB / 28.71 kB (gzip) 92.93 kB / 28.8 kB (gzip) 0.23% / 0.3% (gzip)
spa loader 62.5 kB / 21.6 kB (gzip) 62.51 kB / 21.61 kB (gzip) 0.03% / 0.05% (gzip)
spa async-chunk 117.3 kB / 35.7 kB (gzip) 117.51 kB / 35.78 kB (gzip) 0.18% / 0.22% (gzip)

Copy link

codecov bot commented Jul 24, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.78%. Comparing base (42a16ee) to head (5dbe4cb).

Files with missing lines Patch % Lines
src/features/jserrors/aggregate/index.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1531      +/-   ##
==========================================
- Coverage   87.79%   87.78%   -0.02%     
==========================================
  Files         198      199       +1     
  Lines        7808     7817       +9     
  Branches     1573     1577       +4     
==========================================
+ Hits         6855     6862       +7     
- Misses        822      824       +2     
  Partials      131      131              
Flag Coverage Δ
unit-tests 79.08% <80.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

github-actions bot commented Jul 24, 2025

Static Badge

Last ran on July 24, 2025 13:02:37 CDT
Checking merge of (5dbe4cb) into main (42a16ee)

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.

1 participant