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

chore: Add page url to Session Replay and Session Trace payloads #1203

Merged
merged 10 commits into from
Oct 2, 2024

Conversation

ptang-nr
Copy link
Contributor

@ptang-nr ptang-nr commented Sep 27, 2024

To aid with troubleshooting Session Replay and Session Trace, page url will be included in the respective payload's query string under attributes.currentUrl.

Overview

In this PR, we are adding the page URL to the query string of the corresponding Session Replay and Session Trace payloads under attributes.pageUrl. The page URL will be added last, so if the total payload size exceeds current limit (5000), then truncation may occur.

Related Issue(s)

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

Testing

  • Added a test condition to the Session Replay standard payload unit test
  • Manually tested and confirmed presence of URL in payload:

Session Replay
Screenshot 2024-10-02 at 12 14 32 PM

Session Trace
Screenshot 2024-10-02 at 12 18 07 PM

Copy link

github-actions bot commented Sep 27, 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 30.48 kB / 11.03 kB (gzip) 30.48 kB / 11.03 kB (gzip) 0% / 0% (gzip)
lite async-chunk 51.57 kB / 16.74 kB (gzip) 51.57 kB / 16.74 kB (gzip) 0% / 0% (gzip)
pro loader 51.5 kB / 17.79 kB (gzip) 51.5 kB / 17.79 kB (gzip) 0% / 0% (gzip)
pro async-chunk 99.71 kB / 30.47 kB (gzip) 99.86 kB / 30.5 kB (gzip) 0.15% / 0.09% (gzip)
spa loader 59.15 kB / 20.16 kB (gzip) 59.15 kB / 20.16 kB (gzip) 0% / -0.01% (gzip)
spa async-chunk 114.78 kB / 34.82 kB (gzip) 114.93 kB / 34.86 kB (gzip) 0.13% / 0.11% (gzip)

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.60%. Comparing base (033f97a) to head (7b33763).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1203   +/-   ##
=======================================
  Coverage   88.60%   88.60%           
=======================================
  Files         168      168           
  Lines        7334     7334           
  Branches     1501     1501           
=======================================
  Hits         6498     6498           
  Misses        713      713           
  Partials      123      123           
Flag Coverage Δ
unit-tests 78.99% <100.00%> (ø)

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.

@ptang-nr ptang-nr marked this pull request as ready for review September 27, 2024 19:29
Origin url set initially at runtime is fixed and could become inaccurate for soft navigation (aka. SPA) usage scenarios.
metal-messiah
metal-messiah previously approved these changes Sep 30, 2024
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.

Once this has a passing test run i think this is g2g

Copy link

github-actions bot commented Oct 1, 2024

Static Badge

Last ran on October 01, 2024 13:26:38 CDT
Checking merge of (b49f2c4) into main (b5e4c6d)

@ptang-nr ptang-nr merged commit 1306012 into main Oct 2, 2024
16 checks passed
@ptang-nr ptang-nr deleted the NR-268394-add-url-to-SR-ST-payloads branch October 2, 2024 19:11
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