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: relative timestamps in session trace #1142

Merged
merged 5 commits into from
Aug 19, 2024

Conversation

patrickhousley
Copy link
Contributor

In rare cases where PerformanceNavigationTiming API is undefined, session trace timing nodes would be reported using epoch timestamp values instead of relative timestamp values. This would result in a broken session trace experience in New Relic. If the PerformanceNavigationTiming API is unavailable, the epoch timestamps will now be converted to relative timestamps accounting for user clock difference with New Relic servers.

Overview

Added code to convert epoch timestamps from performance.timing to relative timestamps correcting for NR server time.

Related Issue(s)

https://new-relic.atlassian.net/browse/NR-297306

Testing

Copy link

github-actions bot commented Aug 8, 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 32.48 kB / 11.31 kB (gzip) 32.48 kB / 11.31 kB (gzip) 0% / 0.02% (gzip)
lite async-chunk 50.45 kB / 16.25 kB (gzip) 50.52 kB / 16.26 kB (gzip) 0.14% / 0.07% (gzip)
pro loader 53.51 kB / 18.04 kB (gzip) 53.51 kB / 18.04 kB (gzip) 0% / 0.02% (gzip)
pro async-chunk 97.58 kB / 29.17 kB (gzip) 98.44 kB / 29.33 kB (gzip) 0.88% / 0.54% (gzip)
spa loader 61.47 kB / 20.47 kB (gzip) 61.47 kB / 20.48 kB (gzip) 0% / 0.01% (gzip)
spa async-chunk 112.67 kB / 33.51 kB (gzip) 113.53 kB / 33.65 kB (gzip) 0.77% / 0.44% (gzip)

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.

Project coverage is 88.85%. Comparing base (fbc6f9d) to head (167f544).
Report is 1 commits behind head on main.

Files Patch % Lines
src/features/session_replay/aggregate/index.js 50.00% 2 Missing ⚠️
src/common/timing/time-keeper.js 83.33% 1 Missing ⚠️
src/features/jserrors/aggregate/index.js 80.00% 1 Missing ⚠️
src/features/page_view_event/aggregate/index.js 0.00% 1 Missing ⚠️
.../features/session_trace/aggregate/trace/storage.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1142      +/-   ##
==========================================
+ Coverage   88.77%   88.85%   +0.07%     
==========================================
  Files         162      162              
  Lines        7289     7303      +14     
  Branches     1444     1446       +2     
==========================================
+ Hits         6471     6489      +18     
+ Misses        707      705       -2     
+ Partials      111      109       -2     
Flag Coverage Δ
integration-tests 91.68% <68.42%> (+0.05%) ⬆️
unit-tests 79.20% <64.28%> (-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.

Copy link

github-actions bot commented Aug 8, 2024

Static Badge

Last ran on August 16, 2024 00:52:48 CDT
Checking merge of (167f544) into main (fbc6f9d)

@patrickhousley patrickhousley merged commit 378b1fb into main Aug 19, 2024
33 of 34 checks passed
@patrickhousley patrickhousley deleted the fix-relative-timestamp-session-trace2 branch August 19, 2024 11:57
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