Skip to content

fix: User frustrations logic should be gated#1600

Merged
ptang-nr merged 4 commits intomainfrom
NR-443293-network-requests-fix
Oct 24, 2025
Merged

fix: User frustrations logic should be gated#1600
ptang-nr merged 4 commits intomainfrom
NR-443293-network-requests-fix

Conversation

@ptang-nr
Copy link
Contributor

Move user frustrations logic to browser scope only with FF gate in Generic Events instrumentation. This should avoid running extraneous wrapping logic and events related to user frustrations.

Overview

Avoid running extraneous logic if user_frustrations FF is not enabled.

Related Issue(s)

NR-443293

Testing

Adjusted the component test to include the FF (it caught the logic stopped running w/o the FF).

@github-actions
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.

@github-actions
Copy link

github-actions bot commented Oct 22, 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.96 kB / 9.8 kB (gzip) 25.96 kB / 9.8 kB (gzip) 0% / 0% (gzip)
lite async-chunk 53.13 kB / 17.72 kB (gzip) 53.13 kB / 17.72 kB (gzip) 0% / 0% (gzip)
pro loader 54.4 kB / 19.24 kB (gzip) 54.48 kB / 19.27 kB (gzip) 0.14% / 0.16% (gzip)
pro async-chunk 91.8 kB / 28.82 kB (gzip) 91.8 kB / 28.82 kB (gzip) 0% / 0% (gzip)
spa loader 63.2 kB / 21.92 kB (gzip) 63.28 kB / 21.95 kB (gzip) 0.12% / 0.15% (gzip)
spa async-chunk 117.21 kB / 36.11 kB (gzip) 117.21 kB / 36.11 kB (gzip) 0% / 0% (gzip)

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 88.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.60%. Comparing base (b41de5c) to head (2514314).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/features/generic_events/instrument/index.js 88.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1600   +/-   ##
=======================================
  Coverage   88.60%   88.60%           
=======================================
  Files         206      206           
  Lines        7746     7748    +2     
  Branches     1584     1586    +2     
=======================================
+ Hits         6863     6865    +2     
  Misses        772      772           
  Partials      111      111           
Flag Coverage Δ
unit-tests 81.87% <88.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.

metal-messiah
metal-messiah previously approved these changes Oct 22, 2025
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

Static Badge

Last ran on October 24, 2025 12:02:28 CDT
Checking merge of (2514314) into main (b41de5c)

@ptang-nr
Copy link
Contributor Author

One of the tests failed in Safari but passes when I test locally

 npm run wdio -- -r false -T tests/specs/ajax/distributed-tracing.e2e.js -b safari@latest

> @newrelic/browser-agent@1.301.0 wdio
> node --max-old-space-size=8192 tools/wdio/bin/cli.js -r false -T tests/specs/ajax/distributed-tracing.e2e.js -b safari@latest


Execution of 1 workers started at 2025-10-24T17:04:45.679Z

Current version of Node Tunnel:  4.0.9
Verifying credentials
Auth succeeded
Checking for updates
Binary already at latest version
Starting tunnel
Tunnel successfully initiated. You can start testing now
[0-0] RUNNING in Safari - file:///tools/wdio/plugins/mocha-globals/globals.mjs, file:///tests/specs/ajax/distributed-tracing.e2e.js
[0-0] 2025-10-24T17:05:07.820Z INFO test-logger: Executing in: Safari macOS Sequoia
...
Screenshot 2025-10-24 at 10 13 03 AM

@ptang-nr ptang-nr merged commit 984b05e into main Oct 24, 2025
47 of 50 checks passed
@ptang-nr ptang-nr deleted the NR-443293-network-requests-fix branch October 24, 2025 17:19
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