Skip to content

fix: Keep Ajax payload out of unrelated events#1809

Open
ptang-nr wants to merge 1 commit into
mainfrom
NR-582727-ajax-xhr-timeslices
Open

fix: Keep Ajax payload out of unrelated events#1809
ptang-nr wants to merge 1 commit into
mainfrom
NR-582727-ajax-xhr-timeslices

Conversation

@ptang-nr

@ptang-nr ptang-nr commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Drops captured AJAX request + payload info from unrelated events (AJAX timeslice metrics, session trace) via a shared params object.


Overview

In this PR, we remove assignments to the params object inside storeXHR. It was possibly a legacy mechanism for passing info to the old SPA implementation. Verified these fields are not pulled from params in the consumer. The consumer should be pulling these fields from the AjaxNode/events directly.

Related Issue(s)

NR-582727

Testing

Added component tests for the shape of params in timeslice metrics + session trace, as well as the Ajax event.

Params:

['method', 'status', 'host', 'hostname', 'pathname']

Ajax:

['method', 'status', 'domain', 'path', 'requestSize', 'responseSize', 'type', 'startTime', 
'endTime', 'callbackDuration', 'ajaxRequest.id', 'gql', 'requestQuery', 'requestHeaders', 
'responseHeaders', 'requestBody', 'responseBody']

@ptang-nr ptang-nr temporarily deployed to nr1-experiments July 9, 2026 19:06 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 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 Jul 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 27.24 kB / 10.2 kB (gzip) 26.8 kB / 10.16 kB (gzip) -1.63% / -0.43% (gzip)
lite async-chunk 59.82 kB / 19.99 kB (gzip) 59.6 kB / 19.96 kB (gzip) -0.36% / -0.14% (gzip)
pro loader 69.99 kB / 24.32 kB (gzip) 69.55 kB / 24.28 kB (gzip) -0.64% / -0.19% (gzip)
pro async-chunk 97.4 kB / 30.85 kB (gzip) 97.07 kB / 30.79 kB (gzip) -0.34% / -0.18% (gzip)
spa loader 72.31 kB / 25.05 kB (gzip) 71.86 kB / 24.99 kB (gzip) -0.62% / -0.23% (gzip)
spa async-chunk 109.55 kB / 34.07 kB (gzip) 109.22 kB / 34 kB (gzip) -0.3% / -0.2% (gzip)

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.23%. Comparing base (d75f4bf) to head (421908d).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1809      +/-   ##
==========================================
+ Coverage   90.09%   90.23%   +0.14%     
==========================================
  Files         214      215       +1     
  Lines        7852     7988     +136     
  Branches     1669     1704      +35     
==========================================
+ Hits         7074     7208     +134     
- Misses        708      710       +2     
  Partials       70       70              
Flag Coverage Δ
unit-tests 86.35% <100.00%> (+0.30%) ⬆️

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 Jul 9, 2026

Copy link
Copy Markdown

Static Badge

Last ran on July 09, 2026 16:38:51 CDT
Checking merge of (421908d) into main (4ae7348)

@ptang-nr ptang-nr marked this pull request as ready for review July 10, 2026 15:22

@ellisong ellisong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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