Skip to content

fix: Calculate browser_stack_hash from truncated stack trace#1789

Merged
ellisong merged 3 commits into
mainfrom
NR-558128-stack-hash
Jun 16, 2026
Merged

fix: Calculate browser_stack_hash from truncated stack trace#1789
ellisong merged 3 commits into
mainfrom
NR-558128-stack-hash

Conversation

@ellisong

@ellisong ellisong commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Calculate the browser stack hash off of the truncated stack trace instead of the non-truncated stack trace. Before this change, first-occurrence harvests of JSE events can have a different browser stack hash from future harvests of the same stack trace if it was truncated. This will improve error grouping of JavaScriptError events.

Overview

Related Issue(s)

JIRA: https://new-relic.atlassian.net/browse/NR-558128

Testing

Make sure unit tests pass. We can add more testing related to truncation logic if it helps.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 26.79 kB / 10.24 kB (gzip) 26.79 kB / 10.24 kB (gzip) 0% / -0.01% (gzip)
lite async-chunk 58.92 kB / 19.76 kB (gzip) 58.92 kB / 19.76 kB (gzip) 0% / 0% (gzip)
pro loader 66.7 kB / 23.5 kB (gzip) 66.61 kB / 23.46 kB (gzip) -0.13% / -0.14% (gzip)
pro async-chunk 96.37 kB / 30.65 kB (gzip) 96.39 kB / 30.65 kB (gzip) 0.02% / 0% (gzip)
spa loader 69.1 kB / 24.28 kB (gzip) 69.01 kB / 24.24 kB (gzip) -0.13% / -0.14% (gzip)
spa async-chunk 108.52 kB / 33.76 kB (gzip) 108.54 kB / 33.76 kB (gzip) 0.02% / 0.01% (gzip)

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.54%. Comparing base (3fd403e) to head (ab73e21).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1789      +/-   ##
==========================================
+ Coverage   89.45%   89.54%   +0.08%     
==========================================
  Files         213      213              
  Lines        7864     7864              
  Branches     1657     1657              
==========================================
+ Hits         7035     7042       +7     
+ Misses        746      743       -3     
+ Partials       83       79       -4     
Flag Coverage Δ
unit-tests 84.97% <100.00%> (+0.18%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Static Badge

Last ran on June 16, 2026 12:59:41 CDT
Checking merge of (ab73e21) into main (3fd403e)

Comment thread src/features/jserrors/aggregate/index.js Outdated
@ellisong ellisong force-pushed the NR-558128-stack-hash branch from 3b13c3d to 093e3b4 Compare June 16, 2026 17:17
@ellisong ellisong changed the title fix: Calculate browser_stack_hash from truncated stack trace fix: Calculate browser_stack_hash from max-sized stack trace Jun 16, 2026
@ellisong ellisong changed the title fix: Calculate browser_stack_hash from max-sized stack trace fix: Calculate browser_stack_hash from truncated stack trace Jun 16, 2026
@ellisong ellisong merged commit f7df627 into main Jun 16, 2026
36 checks passed
@ellisong ellisong deleted the NR-558128-stack-hash branch June 16, 2026 20:10
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.

2 participants