Skip to content
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

fix: Undefined deny list ignores block internal #629

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Conversation

patrickhousley
Copy link
Contributor

In cases where the customer's configuration does not include the init.ajax.deny_list property, the agent would not properly account for the init.ajax.block_internal setting and would not block ajax events for internal agent network calls.

Overview

In cases where the customer's configuration does not include the init.ajax.deny_list property, the agent would not properly account for the init.ajax.block_internal setting and would not block ajax events for internal agent network calls.

This may be an edge case for most of customers since most have at least the BAM endpoint in their deny list. For customers with an empty deny list in their browser entity settings, this fix will now apply the block_internal setting properly.

Related Issue(s)

These are just related tickets. This issue was found while troubleshooting these tickets.
https://issues.newrelic.com/browse/NR-146248
https://issues.newrelic.com/browse/NR-147189

Testing

Running the local server with no changes to settings should now block ajax events for the local server. You can use the fetch test page to verify.

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Static Badge

Last ran on August 01, 2023 15:22:42 CDT
Checking merge of (d21d2f6) into main (ec9b3d2)

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Asset Size Report

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

Asset Name Previous Size New Size Diff
nr-loader-spa.min 51.19 kB / 17.19 kB (gzip) 51.2 kB / 17.2 kB (gzip) +0.01% / +0.05% (gzip)
nr-loader-full.min 44.76 kB / 15.25 kB (gzip) 44.76 kB / 15.26 kB (gzip) +0.01% / +0.06% (gzip)
nr-loader-rum.min 27.99 kB / 9.98 kB (gzip) 28 kB / 9.99 kB (gzip) +0.02% / +0.1% (gzip)
nr-loader-spa-polyfills.min 124.78 kB / 39.59 kB (gzip) 125.56 kB / 39.67 kB (gzip) +0.63% / +0.18% (gzip)
nr-loader-full-polyfills.min 116.77 kB / 37.48 kB (gzip) 117.55 kB / 37.52 kB (gzip) +0.67% / +0.11% (gzip)
nr-loader-rum-polyfills.min 96.76 kB / 31.71 kB (gzip) 97.54 kB / 31.76 kB (gzip) +0.81% / +0.13% (gzip)
nr-loader-worker.min 41.32 kB / 13.98 kB (gzip) 41.32 kB / 13.98 kB (gzip) +0.01% / +0.05% (gzip)

Merging this pull request will result in the following NPM package consumer size changes:

Asset Name Previous Size New Size Diff
Browser Agent 51.32 kB / 17.09 kB (gzip) 51.33 kB / 17.1 kB (gzip) +0.01% / +0.05% (gzip)
Custom Lite Agent 28.14 kB / 9.91 kB (gzip) 28.14 kB / 9.92 kB (gzip) +0.02% / +0.1% (gzip)
Custom Pro Agent 44.81 kB / 15.08 kB (gzip) 44.81 kB / 15.09 kB (gzip) +0.01% / +0.06% (gzip)
Custom SPA Agent 51.21 kB / 17.05 kB (gzip) 51.21 kB / 17.06 kB (gzip) +0.01% / +0.05% (gzip)
Worker Agent 305.17 kB / 94.37 kB (gzip) 305.17 kB / 94.37 kB (gzip) +0% / +0.01% (gzip)
Other Standard CDN Assets

Released Assets

Asset Name Asset Size
recorder.643cfeda.min.js 166.33 kB / 52.44 kB (gzip)
spa-aggregate.495db083.min.js 20.96 kB / 7.45 kB (gzip)
page_view_timing-aggregate.d72a908a.min.js 14.99 kB / 5.44 kB (gzip)
860.8fec16f2.min.js 14.09 kB / 5.27 kB (gzip)
session_trace-aggregate.a490ad60.min.js 12.25 kB / 4.53 kB (gzip)
page_view_event-aggregate.e765729e.min.js 11.12 kB / 4.19 kB (gzip)
jserrors-aggregate.f8100d3b.min.js 9.55 kB / 3.65 kB (gzip)
metrics-aggregate.41a8a1b8.min.js 8.83 kB / 3 kB (gzip)
646.5aafce46.min.js 7.99 kB / 3.36 kB (gzip)
session_replay-aggregate.948ed12b.min.js 7.97 kB / 2.93 kB (gzip)
ajax-aggregate.629e6d59.min.js 7.19 kB / 3.1 kB (gzip)
compressor.772ac1fe.min.js 7.09 kB / 3.57 kB (gzip)
page_action-aggregate.636893b0.min.js 4.73 kB / 1.92 kB (gzip)
async-api.eaff3276.min.js 2.69 kB / 1.38 kB (gzip)
session-manager.22036a2b.min.js 1.47 kB / 742 B (gzip)
lazy-feature-loader.d2774909.min.js 1.17 kB / 498 B (gzip)

Built Assets

Asset Name Asset Size
recorder.643cfeda.min.js 166.33 kB / 52.44 kB (gzip)
spa-aggregate.495db083.min.js 20.96 kB / 7.45 kB (gzip)
page_view_timing-aggregate.d72a908a.min.js 14.99 kB / 5.44 kB (gzip)
860.8fec16f2.min.js 14.09 kB / 5.27 kB (gzip)
session_trace-aggregate.a490ad60.min.js 12.25 kB / 4.53 kB (gzip)
page_view_event-aggregate.e765729e.min.js 11.12 kB / 4.19 kB (gzip)
jserrors-aggregate.f8100d3b.min.js 9.55 kB / 3.65 kB (gzip)
metrics-aggregate.41a8a1b8.min.js 8.83 kB / 3 kB (gzip)
646.5aafce46.min.js 7.99 kB / 3.36 kB (gzip)
session_replay-aggregate.948ed12b.min.js 7.97 kB / 2.93 kB (gzip)
ajax-aggregate.629e6d59.min.js 7.19 kB / 3.1 kB (gzip)
compressor.772ac1fe.min.js 7.09 kB / 3.57 kB (gzip)
page_action-aggregate.636893b0.min.js 4.73 kB / 1.92 kB (gzip)
async-api.eaff3276.min.js 2.69 kB / 1.38 kB (gzip)
session-manager.22036a2b.min.js 1.47 kB / 742 B (gzip)
lazy-feature-loader.d2774909.min.js 1.17 kB / 498 B (gzip)
Other Polyfill CDN Assets

Released Assets

Asset Name Asset Size
recorder.643cfeda-es5.min.js 167.03 kB / 52.48 kB (gzip)
nr-polyfills.min.js 52.26 kB / 18.01 kB (gzip)
session_trace-aggregate.55fac0dd-es5.min.js 32.27 kB / 8.5 kB (gzip)
compressor.5b9c7398-es5.min.js 30.02 kB / 11.29 kB (gzip)
session_replay-aggregate.6c0aba07-es5.min.js 19.27 kB / 6.54 kB (gzip)
page_view_timing-aggregate.3d86db09-es5.min.js 18.68 kB / 6.17 kB (gzip)
spa-aggregate.1f73f06f-es5.min.js 17.77 kB / 6.14 kB (gzip)
173.3788d9f7-es5.min.js 17.41 kB / 6.14 kB (gzip)
page_view_event-aggregate.e71662d2-es5.min.js 12.65 kB / 4.8 kB (gzip)
jserrors-aggregate.2883be04-es5.min.js 12.33 kB / 4.4 kB (gzip)
385.d801f3b5-es5.min.js 10.49 kB / 4.18 kB (gzip)
metrics-aggregate.1471998c-es5.min.js 10.18 kB / 3.41 kB (gzip)
945.d2c7843e-es5.min.js 7.51 kB / 2.72 kB (gzip)
page_action-aggregate.087bc19b-es5.min.js 7.33 kB / 2.64 kB (gzip)
ajax-aggregate.d44e21ef-es5.min.js 4.35 kB / 2.07 kB (gzip)
async-api.bb0e3099-es5.min.js 3.84 kB / 1.89 kB (gzip)
session-manager.618cfdd6-es5.min.js 1.7 kB / 783 B (gzip)
lazy-feature-loader.c4f55624-es5.min.js 1.22 kB / 514 B (gzip)

Built Assets

Asset Name Asset Size
recorder.643cfeda-es5.min.js 167.03 kB / 52.48 kB (gzip)
nr-polyfills.min.js 52.26 kB / 18.01 kB (gzip)
session_trace-aggregate.55fac0dd-es5.min.js 32.27 kB / 8.5 kB (gzip)
compressor.5b9c7398-es5.min.js 30.02 kB / 11.29 kB (gzip)
session_replay-aggregate.6c0aba07-es5.min.js 19.27 kB / 6.54 kB (gzip)
page_view_timing-aggregate.3d86db09-es5.min.js 18.68 kB / 6.17 kB (gzip)
spa-aggregate.1f73f06f-es5.min.js 17.77 kB / 6.14 kB (gzip)
173.3788d9f7-es5.min.js 17.41 kB / 6.14 kB (gzip)
page_view_event-aggregate.e71662d2-es5.min.js 12.65 kB / 4.8 kB (gzip)
jserrors-aggregate.2883be04-es5.min.js 12.33 kB / 4.4 kB (gzip)
385.d801f3b5-es5.min.js 10.49 kB / 4.18 kB (gzip)
metrics-aggregate.1471998c-es5.min.js 10.18 kB / 3.41 kB (gzip)
945.d2c7843e-es5.min.js 7.51 kB / 2.72 kB (gzip)
page_action-aggregate.087bc19b-es5.min.js 7.33 kB / 2.64 kB (gzip)
ajax-aggregate.d44e21ef-es5.min.js 4.35 kB / 2.07 kB (gzip)
async-api.bb0e3099-es5.min.js 3.84 kB / 1.89 kB (gzip)
session-manager.618cfdd6-es5.min.js 1.7 kB / 783 B (gzip)
lazy-feature-loader.c4f55624-es5.min.js 1.22 kB / 514 B (gzip)

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #629 (cd99842) into main (ec9b3d2) will increase coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##             main     #629      +/-   ##
==========================================
+ Coverage   68.04%   68.06%   +0.02%     
==========================================
  Files         130      130              
  Lines        6017     6018       +1     
  Branches     1140     1141       +1     
==========================================
+ Hits         4094     4096       +2     
+ Misses       1579     1578       -1     
  Partials      344      344              
Flag Coverage Δ
jest-component 21.19% <80.00%> (+0.05%) ⬆️
jest-unit 23.11% <0.00%> (-0.03%) ⬇️

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

Files Changed Coverage Δ
src/loaders/configure/configure.js 87.50% <88.88%> (-2.83%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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