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

feat: Update agent to use new relic server time #918

Merged
merged 13 commits into from
Mar 28, 2024
Merged

Conversation

patrickhousley
Copy link
Contributor

@patrickhousley patrickhousley commented Mar 18, 2024

Update the agent to use New Relic server time as the timestamp for harvested page action and error data.

Overview

This updates all the harvested data to use the calculated NR server time as the the basis for timestamping harvested data. See the CDD for spec changes.

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-222430
https://new-relic.atlassian.net/browse/NR-222419
https://new-relic.atlassian.net/browse/NR-222426

Testing

@patrickhousley patrickhousley marked this pull request as draft March 18, 2024 13:43
Copy link

github-actions bot commented Mar 18, 2024

Asset Size Report

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

Agent Asset Previous Size New Size Diff
lite loader 31.98 kB / 11.17 kB (gzip) 32.21 kB / 11.25 kB (gzip) 0.72% / 0.69% (gzip)
lite async-chunk 50.57 kB / 16.36 kB (gzip) 50.56 kB / 16.36 kB (gzip) -0.03% / -0.01% (gzip)
pro loader 51.14 kB / 17.4 kB (gzip) 51.37 kB / 17.49 kB (gzip) 0.44% / 0.53% (gzip)
pro async-chunk 91.96 kB / 28.07 kB (gzip) 92.06 kB / 28.11 kB (gzip) 0.11% / 0.16% (gzip)
spa loader 59.71 kB / 20 kB (gzip) 59.94 kB / 20.08 kB (gzip) 0.38% / 0.38% (gzip)
spa async-chunk 106.18 kB / 32.25 kB (gzip) 106.46 kB / 32.35 kB (gzip) 0.27% / 0.3% (gzip)
lite-polyfills loader 127.21 kB / 40.89 kB (gzip) 127.52 kB / 41.02 kB (gzip) 0.25% / 0.33% (gzip)
lite-polyfills async-chunk 63.99 kB / 18.51 kB (gzip) 63.98 kB / 18.51 kB (gzip) -0.02% / -0.02% (gzip)
pro-polyfills loader 147.24 kB / 46.81 kB (gzip) 147.55 kB / 46.94 kB (gzip) 0.22% / 0.28% (gzip)
pro-polyfills async-chunk 126.32 kB / 32.97 kB (gzip) 126.42 kB / 33.02 kB (gzip) 0.08% / 0.16% (gzip)
spa-polyfills loader 155.26 kB / 48.93 kB (gzip) 155.57 kB / 49.06 kB (gzip) 0.2% / 0.27% (gzip)
spa-polyfills async-chunk 142.82 kB / 37.42 kB (gzip) 143.15 kB / 37.58 kB (gzip) 0.23% / 0.43% (gzip)

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 64.78873% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 80.46%. Comparing base (526a38a) to head (84ebbc7).
Report is 3 commits behind head on main.

Files Patch % Lines
src/features/spa/aggregate/index.js 33.33% 4 Missing and 2 partials ⚠️
src/loaders/micro-agent.js 0.00% 4 Missing ⚠️
src/features/jserrors/instrument/index.js 25.00% 3 Missing ⚠️
src/features/spa/instrument/index.js 0.00% 3 Missing ⚠️
src/features/ajax/instrument/index.js 75.00% 2 Missing ⚠️
src/features/jserrors/aggregate/index.js 33.33% 1 Missing and 1 partial ⚠️
src/common/context/shared-context.js 0.00% 1 Missing ⚠️
src/common/timing/time-keeper.js 92.85% 1 Missing ⚠️
src/features/page_view_event/aggregate/index.js 50.00% 1 Missing ⚠️
src/features/session_trace/aggregate/index.js 66.66% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
- Coverage   80.50%   80.46%   -0.04%     
==========================================
  Files         154      153       -1     
  Lines        7053     7095      +42     
  Branches     1395     1402       +7     
==========================================
+ Hits         5678     5709      +31     
  Misses       1172     1172              
- Partials      203      214      +11     
Flag Coverage Δ
integration-tests 90.03% <82.50%> (+0.06%) ⬆️
unit-tests 58.38% <35.93%> (+0.08%) ⬆️

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.

Copy link

github-actions bot commented Mar 18, 2024

Static Badge

Last ran on March 28, 2024 12:45:07 CDT
Checking merge of (84ebbc7) into main (526a38a)

@patrickhousley patrickhousley force-pushed the utilize-nr-time branch 2 times, most recently from 2573e7a to be42478 Compare March 26, 2024 16:34
src/common/url/beacon.js Outdated Show resolved Hide resolved
@patrickhousley patrickhousley marked this pull request as ready for review March 27, 2024 20:45
Copy link
Member

@metal-messiah metal-messiah left a comment

Choose a reason for hiding this comment

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

code changes make sense, when tests can pass reliably i think it lgtm

@patrickhousley patrickhousley merged commit 8a4831c into main Mar 28, 2024
48 of 51 checks passed
@patrickhousley patrickhousley deleted the utilize-nr-time branch March 28, 2024 19: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