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

[REPLAY-898] Recording Frustration signals (dead, error & rage clicks) for session replay #1632

Merged
merged 26 commits into from
Jul 21, 2022

Conversation

N-Boutaib
Copy link
Contributor

@N-Boutaib N-Boutaib commented Jul 7, 2022

Motivation

We would like to report frustration signals in form of session replay records in order to animate it on the session replay player

Changes

Recording frustration signals linked to dead, error and rage clicks for session replay.
Besides, it changes the start date of a segment to the date of earliest contained record.

Testing

On staging, the browser SDK should see that frustration records are sent.

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bits-bot
Copy link

bits-bot commented Jul 7, 2022

CLA assistant check
All committers have signed the CLA.

@N-Boutaib N-Boutaib self-assigned this Jul 7, 2022
@N-Boutaib N-Boutaib force-pushed the najib.boutaib/sr-898-add-frustration-records branch from 883dff2 to 04f317c Compare July 7, 2022 16:12
packages/rum/src/domain/record/record.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/record/utils.ts Outdated Show resolved Hide resolved
packages/rum/src/types/record.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/record/observer.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2022

Codecov Report

Merging #1632 (a8b5ff2) into main (97a51c6) will decrease coverage by 0.24%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main    #1632      +/-   ##
==========================================
- Coverage   90.86%   90.61%   -0.25%     
==========================================
  Files         129      129              
  Lines        4686     4712      +26     
  Branches     1050     1059       +9     
==========================================
+ Hits         4258     4270      +12     
- Misses        428      442      +14     
Impacted Files Coverage Δ
packages/rum/src/boot/startRecording.ts 95.45% <ø> (ø)
packages/rum/src/types/record.ts 100.00% <ø> (ø)
packages/rum/test/utils.ts 82.41% <0.00%> (-2.33%) ⬇️
packages/rum/src/domain/record/record.ts 70.96% <50.00%> (-4.79%) ⬇️
packages/rum/src/domain/record/observer.ts 68.86% <60.00%> (-1.41%) ⬇️
...ain/rumEventsCollection/action/actionCollection.ts 95.45% <100.00%> (ø)
...in/rumEventsCollection/action/trackClickActions.ts 98.03% <100.00%> (+0.01%) ⬆️
packages/rum/src/domain/record/utils.ts 100.00% <100.00%> (ø)
...ckages/rum/src/domain/segmentCollection/segment.ts 97.36% <100.00%> (+0.07%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@N-Boutaib N-Boutaib marked this pull request as ready for review July 11, 2022 09:30
@N-Boutaib N-Boutaib requested review from a team as code owners July 11, 2022 09:30
@N-Boutaib N-Boutaib requested a review from BenoitZugmeyer July 11, 2022 12:25
@N-Boutaib N-Boutaib changed the title [REPLAY-898] Recording dead and error clicks for session replay [REPLAY-898] Recording Frustration signals (dead, error & rage clicks) for session replay Jul 11, 2022
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.

Nice work 👏
It could be interesting to also add some e2e tests to check that:

  • frustration records are created on action with frustration
  • ids are matching between frustration record and mouse interaction incremental record

packages/rum-core/src/domainContext.types.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/record/utils.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/record/observer.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/segmentCollection/segment.spec.ts Outdated Show resolved Hide resolved
packages/rum/src/domain/segmentCollection/segment.ts Outdated Show resolved Hide resolved
@N-Boutaib N-Boutaib requested a review from bcaudan July 13, 2022 14:27
Copy link
Contributor

@liywjl liywjl left a comment

Choose a reason for hiding this comment

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

Great work! 👍

@N-Boutaib N-Boutaib requested a review from bcaudan July 19, 2022 08:52
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.

LGTM 👍

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.

Looks great!

packages/rum/src/domain/record/observer.ts Outdated Show resolved Hide resolved
test/e2e/scenario/recorder/recorder.scenario.ts Outdated Show resolved Hide resolved
@N-Boutaib N-Boutaib force-pushed the najib.boutaib/sr-898-add-frustration-records branch from fca0106 to 0ee3479 Compare July 20, 2022 11:31
@N-Boutaib N-Boutaib requested a review from BenoitZugmeyer July 20, 2022 11:33
@N-Boutaib N-Boutaib merged commit 6163516 into main Jul 21, 2022
@N-Boutaib N-Boutaib deleted the najib.boutaib/sr-898-add-frustration-records branch July 21, 2022 08:39
@bcaudan
Copy link
Contributor

bcaudan commented Aug 1, 2022

available in 4.16.0

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.

6 participants