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: Correct naming for logging pageUrl attribute #1225

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

ellisong
Copy link
Contributor

@ellisong ellisong commented Oct 22, 2024

Corrects naming for the Logging pageUrl attribute by using the original url of the page instead of the url of when the event happens. Removes origin attribute from the runtime model object.

Overview

Corrects the naming for the Logging pageUrl attribute by using the original url of the page instead of the url of when the event happens. The original url of the page is also referred to as initialLocation. A test has been added to check that the pageUrl attribute in the Log object is initialLocation.

Removes origin attribute from the runtime model object by cleaning up usage of runtime.origin in spa feature. The initialLocation constant is a direct replacement for it.

These changes are for cleaning up the agent code.

Related Issue(s)

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

Testing

Make sure tests pass. Agent should work identically to before except that the pageUrl for logging events is now corrected to the original URL.

Copy link

github-actions bot commented Oct 22, 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 28.81 kB / 10.5 kB (gzip) 28.79 kB / 10.49 kB (gzip) -0.08% / -0.11% (gzip)
lite async-chunk 52.78 kB / 17.16 kB (gzip) 52.78 kB / 17.16 kB (gzip) 0% / 0% (gzip)
pro loader 49.8 kB / 17.27 kB (gzip) 49.78 kB / 17.26 kB (gzip) -0.05% / -0.06% (gzip)
pro async-chunk 101.35 kB / 30.97 kB (gzip) 101.34 kB / 30.97 kB (gzip) -0.01% / 0% (gzip)
spa loader 57.46 kB / 19.62 kB (gzip) 57.44 kB / 19.61 kB (gzip) -0.04% / -0.05% (gzip)
spa async-chunk 116.42 kB / 35.31 kB (gzip) 116.35 kB / 35.29 kB (gzip) -0.05% / -0.05% (gzip)

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.42%. Comparing base (c6a20e1) to head (67957cb).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1225      +/-   ##
==========================================
- Coverage   88.43%   88.42%   -0.01%     
==========================================
  Files         169      169              
  Lines        7365     7363       -2     
  Branches     1507     1507              
==========================================
- Hits         6513     6511       -2     
  Misses        726      726              
  Partials      126      126              
Flag Coverage Δ
integration-tests 91.58% <100.00%> (-0.01%) ⬇️
unit-tests 79.40% <100.00%> (-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 Oct 22, 2024

Static Badge

Last ran on October 22, 2024 18:26:49 CDT
Checking merge of (67957cb) into main (c6a20e1)

ptang-nr
ptang-nr previously approved these changes Oct 22, 2024
Copy link
Contributor

@ptang-nr ptang-nr left a comment

Choose a reason for hiding this comment

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

LGTM

@ellisong ellisong merged commit 95f5a77 into main Oct 28, 2024
30 of 32 checks passed
@ellisong ellisong deleted the logging-page-url-naming branch October 28, 2024 19:00
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