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

✨[RUMF-738] migrate view to v2 format (experimental) #586

Merged
merged 5 commits into from
Oct 23, 2020
Merged

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Oct 22, 2020

Motivation

Following #570, migrating view to v2 format

Changes

  • introduce view collection
  • move some rum spec to appropriate test files
  • handle view in v2

Testing

unit tests, staging


I have gone over the contributing documentation.

@bcaudan bcaudan changed the title ✨[RUMF-738] migrate resource to v2 format (experimental) ✨[RUMF-738] migrate view to v2 format (experimental) Oct 22, 2020
@codecov-io
Copy link

Codecov Report

Merging #586 into bcaudan/resources will increase coverage by 0.63%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           bcaudan/resources     #586      +/-   ##
=====================================================
+ Coverage              87.95%   88.58%   +0.63%     
=====================================================
  Files                     47       48       +1     
  Lines                   2382     2391       +9     
  Branches                 493      495       +2     
=====================================================
+ Hits                    2095     2118      +23     
+ Misses                   287      273      -14     
Impacted Files Coverage Δ
packages/rum/src/domain/lifeCycle.ts 100.00% <ø> (ø)
packages/rum/src/domain/parentContexts.ts 98.52% <ø> (+14.70%) ⬆️
packages/rum/src/types.ts 100.00% <ø> (ø)
packages/rum/src/typesV2.ts 100.00% <ø> (ø)
packages/rum/src/boot/rum.ts 59.61% <100.00%> (-2.89%) ⬇️
.../src/domain/rumEventsCollection/view/trackViews.ts 96.33% <100.00%> (ø)
.../domain/rumEventsCollection/view/viewCollection.ts 100.00% <100.00%> (ø)
packages/rum/src/transport/batch.ts 80.48% <0.00%> (+9.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c539dcc...cac2164. Read the comment docs.

@@ -10,7 +10,7 @@ import {
SESSION_KEEP_ALIVE_INTERVAL,
THROTTLE_VIEW_UPDATE_PERIOD,
View,
} from '../domain/rumEventsCollection/view/viewCollection'
} from '../domain/rumEventsCollection/view/trackViews'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This naming is not really satisfying since trackXxx and xxxCollection means pretty much the same thing 😕
I'd be willing to go with that for now and wait the end of the migration to have a better overview and see what we can do.

@@ -114,6 +83,34 @@ describe('rum session', () => {
expect(subsequentRequests[0].view.id).not.toEqual(initialRequests[0].view.id)
})

it('when the session is renewed, a new view event should be sent', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of the remaining tests are integration tests, it could be interesting to see what we want to do with them at some point.

Base automatically changed from bcaudan/resources to master October 23, 2020 08:33
@bcaudan bcaudan marked this pull request as ready for review October 23, 2020 08:44
@bcaudan bcaudan requested a review from a team as a code owner October 23, 2020 08:44
@bcaudan bcaudan merged commit 2e42619 into master Oct 23, 2020
@bcaudan bcaudan deleted the bcaudan/view branch October 23, 2020 13:46
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