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: Decorate harvest requests with ht (hasTrace) param #1409

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ptang-nr
Copy link
Contributor

Decorate with ht (hasTrace) query param for all harvest requests except for blobs and logs endpoints. This helps support searching for browser data with associated tracing data.

Overview

In this PR, a ht query param will be added to most outgoing requests when tracing is running to indicate the presence of tracing data.

Related Issue(s)

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

Testing

Added integration test to look for the presence/absence of the ht param
Also manually checked on a test page

Copy link

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.01 kB / 10.89 kB (gzip) 30.03 kB / 10.9 kB (gzip) 0.07% / 0.13% (gzip)
lite async-chunk 51.3 kB / 16.77 kB (gzip) 51.4 kB / 16.8 kB (gzip) 0.19% / 0.17% (gzip)
pro loader 52.13 kB / 17.95 kB (gzip) 52.15 kB / 17.96 kB (gzip) 0.04% / 0.04% (gzip)
pro async-chunk 100.3 kB / 30.63 kB (gzip) 100.4 kB / 30.67 kB (gzip) 0.11% / 0.11% (gzip)
spa loader 59.75 kB / 20.27 kB (gzip) 59.77 kB / 20.29 kB (gzip) 0.04% / 0.07% (gzip)
spa async-chunk 115.01 kB / 34.96 kB (gzip) 115.12 kB / 34.99 kB (gzip) 0.09% / 0.08% (gzip)

@ptang-nr ptang-nr changed the title feat: Decorate harvest requests with ht (hasTrace) param where applicable feat: Decorate harvest requests with ht (hasTrace) param Mar 10, 2025
Copy link

github-actions bot commented Mar 10, 2025

Static Badge

Last ran on March 10, 2025 13:03:43 CDT
Checking merge of (ef7e197) into main (2b093e8)

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.66%. Comparing base (2b093e8) to head (5a0126d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1409   +/-   ##
=======================================
  Coverage   88.66%   88.66%           
=======================================
  Files         169      169           
  Lines        7411     7412    +1     
  Branches     1504     1506    +2     
=======================================
+ Hits         6571     6572    +1     
  Misses        733      733           
  Partials      107      107           
Flag Coverage Δ
unit-tests 79.91% <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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants