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

Automatic click user action collection #338

Merged
merged 36 commits into from
Apr 8, 2020

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Apr 3, 2020

This PR implements the automatic click user action collection based on the previous POC.

For now, it is behind the collect-user-actions feature flag.

Future steps will include:

  • Count errors, long tasks and resources in the user action event (in user_action.measures)
  • Implement the "load view" user action, and discard the current "click" user action if a new view is accessed.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner April 3, 2020 16:48
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/click-user-action branch from d2a6760 to f6174ed Compare April 3, 2020 17:00
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/click-user-action branch from f6174ed to 8c3771b Compare April 3, 2020 17:04
This commit addresses typings issues in the E2E tests to make tests
more easier to write.

RUM events returned by the server are not the same as those used accross
the sdk. Typically, their properties are snake cased instead of
camelCased.  To improve this, we remove the SDK types usages, and
replace them by custom types used only for those tests.  A bit of
typings are repeated, but it makes the DX more easier.  Those types can
be adjusted at will for the tests needs.

Some grobal types have been adjusted too.
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/click-user-action branch from 8c3771b to 1a4fe75 Compare April 3, 2020 17:57
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/click-user-action branch from 1a4fe75 to 2312a55 Compare April 3, 2020 17:58
packages/core/src/errorCollection.ts Outdated Show resolved Hide resolved
packages/core/src/requestCollection.ts Outdated Show resolved Hide resolved
packages/core/src/requestCollection.ts Outdated Show resolved Hide resolved
packages/core/test/requestCollection.spec.ts Outdated Show resolved Hide resolved
packages/core/test/requestCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/test/userActionCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/test/userActionCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/test/userActionCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/test/userActionCollection.spec.ts Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Apr 6, 2020

Codecov Report

Merging #338 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #338   +/-   ##
=======================================
  Coverage   86.92%   86.92%           
=======================================
  Files          29       29           
  Lines        1621     1621           
  Branches      333      333           
=======================================
  Hits         1409     1409           
  Misses        212      212           

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 5b0ee1c...5b0ee1c. Read the comment docs.

packages/core/src/errorCollection.ts Outdated Show resolved Hide resolved
packages/core/test/requestCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/test/domMutationCollection.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/userActionCollection.ts Outdated Show resolved Hide resolved
packages/rum/src/userActionCollection.ts Outdated Show resolved Hide resolved
packages/rum/src/userActionCollection.ts Outdated Show resolved Hide resolved
packages/rum/src/domMutationCollection.ts Outdated Show resolved Hide resolved
packages/rum/src/rum.ts Show resolved Hide resolved
Copy link
Contributor

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

👍

@BenoitZugmeyer BenoitZugmeyer merged commit 0247a70 into master Apr 8, 2020
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/click-user-action branch April 8, 2020 09:03
BenoitZugmeyer added a commit that referenced this pull request Apr 8, 2020
This also removes the LongTask startTime property that was added
inadvertently by #338
BenoitZugmeyer added a commit that referenced this pull request Apr 8, 2020
* 🐛 [RUM] user action duration should be in ns

* [RUM] change userActionId to userAction.id

* 🏷 [RUM] adjust types

This also removes the LongTask startTime property that was added
inadvertently by #338
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