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: Fix serialization issue with array data #621

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Conversation

metal-messiah
Copy link
Member

Update the harvester to account for array payloads, which in niche cases could convert array payloads to indexed objects.

Overview

This PR updates the cleanPayload mechanics to account for array payloads.

Related Issue(s)

NR-143331

Testing

Session replay wdio tests + harvest.test.js should continue to pass

@metal-messiah metal-messiah added the small Small Engineering Effort label Jul 18, 2023
@github-actions
Copy link

github-actions bot commented Jul 18, 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.19 kB / 17.19 kB (gzip) -0% / +0.01% (gzip)
nr-loader-full.min 44.76 kB / 15.25 kB (gzip) 44.76 kB / 15.25 kB (gzip) -0% / -0% (gzip)
nr-loader-rum.min 27.99 kB / 9.98 kB (gzip) 27.99 kB / 9.98 kB (gzip) -0% / -0% (gzip)
nr-loader-spa-polyfills.min 124.78 kB / 39.6 kB (gzip) 123.88 kB / 39.52 kB (gzip) -0.72% / -0.18% (gzip)
nr-loader-full-polyfills.min 116.77 kB / 37.48 kB (gzip) 115.88 kB / 37.4 kB (gzip) -0.76% / -0.21% (gzip)
nr-loader-rum-polyfills.min 96.76 kB / 31.71 kB (gzip) 95.95 kB / 31.64 kB (gzip) -0.83% / -0.22% (gzip)
nr-loader-worker.min 41.32 kB / 13.98 kB (gzip) 41.32 kB / 13.98 kB (gzip) -0% / -0% (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.32 kB / 17.09 kB (gzip) -0% / -0% (gzip)
Custom Lite Agent 28.14 kB / 9.91 kB (gzip) 28.14 kB / 9.91 kB (gzip) -0% / -0% (gzip)
Custom Pro Agent 44.81 kB / 15.08 kB (gzip) 44.81 kB / 15.08 kB (gzip) -0% / -0% (gzip)
Custom SPA Agent 51.21 kB / 17.05 kB (gzip) 51.21 kB / 17.05 kB (gzip) -0% / -0% (gzip)
Worker Agent 305.15 kB / 94.36 kB (gzip) 305.17 kB / 94.37 kB (gzip) +0.01% / +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.a8872fbe.min.js 7.97 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.6d401e84-es5.min.js 10.47 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 51.82 kB / 17.95 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 Jul 18, 2023

Codecov Report

Merging #621 (d7bef28) into main (ec9b3d2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #621   +/-   ##
=======================================
  Coverage   68.04%   68.04%           
=======================================
  Files         130      130           
  Lines        6017     6017           
  Branches     1140     1140           
=======================================
  Hits         4094     4094           
  Misses       1579     1579           
  Partials      344      344           
Flag Coverage Δ
jest-component 21.14% <100.00%> (ø)
jest-unit 23.13% <100.00%> (ø)

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

Files Changed Coverage Δ
src/common/harvest/harvest.js 100.00% <100.00%> (ø)

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

@metal-messiah metal-messiah marked this pull request as ready for review July 19, 2023 18:49
@github-actions
Copy link

github-actions bot commented Jul 19, 2023

Static Badge

Last ran on July 27, 2023 12:49:49 CDT
Checking merge of (65a6f6a) into main (3d9f2c0)

@metal-messiah
Copy link
Member Author

Circle back and diagnose IE11 issues on unit tests (JIL)

@metal-messiah metal-messiah added the needs follow up Issue needs follow-up to ensure the problem has been solved by a release, PR, or otherwise. label Jul 27, 2023
@metal-messiah metal-messiah merged commit 6887940 into main Aug 1, 2023
@metal-messiah metal-messiah deleted the sr-serialization branch August 1, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs follow up Issue needs follow-up to ensure the problem has been solved by a release, PR, or otherwise. small Small Engineering Effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants