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: Only decorate PageViews with "hasReplay" if the session is not new #1182

Closed
wants to merge 1 commit into from

Conversation

metal-messiah
Copy link
Member

Since the order of operations in the sampling mechanism forces a PageView event to harvest before a replay can be sampled, there is no way to tell if a valid replay will actually be harvested before the PageView is sent. This change prevents any PageView events on the first harvest from gaining the hasReplay flag for consistency in the UI.

Overview

Related Issue(s)

Testing

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.69 kB / 11.1 kB (gzip) 30.69 kB / 11.1 kB (gzip) 0% / -0.03% (gzip)
lite async-chunk 50.27 kB / 16.33 kB (gzip) 50.44 kB / 16.38 kB (gzip) 0.35% / 0.28% (gzip)
pro loader 51.33 kB / 17.72 kB (gzip) 51.33 kB / 17.72 kB (gzip) 0% / 0.03% (gzip)
pro async-chunk 96.81 kB / 29.3 kB (gzip) 96.98 kB / 29.33 kB (gzip) 0.18% / 0.13% (gzip)
spa loader 58.98 kB / 20.1 kB (gzip) 58.98 kB / 20.1 kB (gzip) 0% / 0% (gzip)
spa async-chunk 111.87 kB / 33.64 kB (gzip) 112.05 kB / 33.68 kB (gzip) 0.16% / 0.11% (gzip)

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.42%. Comparing base (b12131c) to head (c69178b).

Files with missing lines Patch % Lines
src/common/harvest/harvest.js 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1182      +/-   ##
==========================================
- Coverage   88.45%   88.42%   -0.03%     
==========================================
  Files         165      165              
  Lines        7249     7258       +9     
  Branches     1484     1489       +5     
==========================================
+ Hits         6412     6418       +6     
- Misses        716      719       +3     
  Partials      121      121              
Flag Coverage Δ
unit-tests 78.83% <70.00%> (-0.03%) ⬇️

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.

@metal-messiah
Copy link
Member Author

closing for now, backend teams are trying to address there first

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.

1 participant