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-878] add startView API #850

Merged
merged 10 commits into from
May 27, 2021
Merged

⚗ [RUMF-878] add startView API #850

merged 10 commits into from
May 27, 2021

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented May 17, 2021

Motivation

First step in the manual view naming strategy

Changes

behind view-renaming flag, introduce new API:

DD_RUM.startView(name?: string)

Allowing to manually start a new view with an optional name

Testing

unit / manual


I have gone over the contributing documentation.

@bcaudan bcaudan requested a review from a team as a code owner May 17, 2021 11:44
bcaudan added 2 commits May 17, 2021 13:49
tedious to follow where are declared methods used publicly
so remove one step
behind `view-renaming` flag
@bcaudan bcaudan force-pushed the bcaudan/new-view-api branch from 4568ba1 to 19fca95 Compare May 17, 2021 13:05
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2021

Codecov Report

Merging #850 (4790c91) into main (f5e2550) will decrease coverage by 0.38%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #850      +/-   ##
==========================================
- Coverage   88.96%   88.57%   -0.39%     
==========================================
  Files          80       80              
  Lines        3642     3651       +9     
  Branches      804      806       +2     
==========================================
- Hits         3240     3234       -6     
- Misses        402      417      +15     
Impacted Files Coverage Δ
packages/rum-core/src/boot/rum.ts 29.16% <14.28%> (-22.84%) ⬇️
packages/core/src/tools/boundedBuffer.ts 100.00% <100.00%> (ø)
packages/logs/src/boot/logs.entry.ts 100.00% <100.00%> (ø)
packages/rum-core/src/boot/rumPublicApi.ts 94.62% <100.00%> (+0.37%) ⬆️
.../src/domain/rumEventsCollection/view/trackViews.ts 97.77% <100.00%> (+0.10%) ⬆️
...omain/rumEventsCollection/error/errorCollection.ts 80.00% <0.00%> (-15.00%) ⬇️
...ckages/core/src/domain/automaticErrorCollection.ts 86.20% <0.00%> (-12.07%) ⬇️

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 f5e2550...4790c91. Read the comment docs.

Copy link
Member

@BenoitZugmeyer BenoitZugmeyer left a comment

Choose a reason for hiding this comment

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

This seems like a good start. Two notes:

  • I think we should ensure that the initial document resource is attached to the initial view instead of the latest created view, since now views can be created before init(). It should be the case, but a unit test to ensure it could be nice.

  • I'm mitigated about the function name. I kind of liked newView. What made you change your mind from the RFC proposal?

@bcaudan bcaudan force-pushed the bcaudan/new-view-api branch from 4437047 to 818db55 Compare May 26, 2021 14:16
test/e2e/lib/framework/createTest.ts Outdated Show resolved Hide resolved
test/e2e/scenario/rum/init.scenario.ts Outdated Show resolved Hide resolved
packages/logs/src/boot/logs.entry.ts Outdated Show resolved Hide resolved
@bcaudan bcaudan force-pushed the bcaudan/new-view-api branch from 349fe5b to 140e12e Compare May 26, 2021 16:19
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer left a comment

Choose a reason for hiding this comment

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

Nice !

@bcaudan bcaudan merged commit cba8ab9 into main May 27, 2021
@bcaudan bcaudan deleted the bcaudan/new-view-api branch May 27, 2021 09:14
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