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

✅ mitigate e2e protocol latency #3295

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

thomas-lebeau
Copy link
Collaborator

@thomas-lebeau thomas-lebeau commented Jan 21, 2025

Motivation

two e2e test start failing quite consistently since around a week ago on Chrome android. The root cause is increased latency in the webdriver <> browserstack connection wich makes 3 consecutive clicks happens slower than a second, not triggering the expected rage_click frustration.

Changes

The mitigation involve using synthetic events instead of webdriver's API to guaranty the clicks happens fast enough to be recognized as rage clicks.

This is not ideal and will be revisited in the future when we move away from webdriver protocol.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.68%. Comparing base (51dfadd) to head (f74b4cf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3295   +/-   ##
=======================================
  Coverage   93.68%   93.68%           
=======================================
  Files         288      288           
  Lines        7617     7617           
  Branches     1739     1739           
=======================================
  Hits         7136     7136           
  Misses        481      481           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cit-pr-commenter bot commented Jan 21, 2025

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 145.66 KiB 145.66 KiB 0 B 0.00%
Logs 51.09 KiB 51.09 KiB 0 B 0.00%
Rum Slim 104.45 KiB 104.45 KiB 0 B 0.00%
Worker 24.50 KiB 24.50 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
addglobalcontext 0.002 0.002 -0.000
addaction 0.049 0.041 -0.008
addtiming 0.001 0.001 -0.000
adderror 0.058 0.050 -0.008
startstopsessionreplayrecording 0.011 0.015 0.003
startview 0.431 0.470 0.039
logmessage 0.028 0.034 0.005
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 27.84 KiB 28.23 KiB 397 B
addaction 57.18 KiB 57.07 KiB -115 B
addtiming 26.19 KiB 29.75 KiB 3.56 KiB
adderror 59.24 KiB 61.07 KiB 1.83 KiB
startstopsessionreplayrecording 25.11 KiB 29.03 KiB 3.93 KiB
startview 413.31 KiB 422.62 KiB 9.31 KiB
logmessage 62.03 KiB 63.06 KiB 1.03 KiB

🔗 RealWorld

@thomas-lebeau thomas-lebeau force-pushed the thomas.lebeau/e2e-fix-things branch from 86db842 to 7415e47 Compare January 22, 2025 11:32
@thomas-lebeau thomas-lebeau force-pushed the thomas.lebeau/e2e-fix-things branch from 7415e47 to f74b4cf Compare January 22, 2025 14:43
@thomas-lebeau thomas-lebeau changed the title fix e2e ✅ mitigate e2e protocol latency Jan 22, 2025
@thomas-lebeau thomas-lebeau marked this pull request as ready for review January 22, 2025 15:35
@thomas-lebeau thomas-lebeau requested a review from a team as a code owner January 22, 2025 15:35
@@ -683,7 +683,7 @@ describe('recorder', () => {
})

createTest('should detect a rage click and match it to mouse interaction records')
.withRum({ trackUserInteractions: true })
.withRum({ trackUserInteractions: true, allowUntrustedEvents: true })
Copy link
Member

Choose a reason for hiding this comment

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

🥜 nitpick:

allowUntrustedEvents: true,
allowUntrustedEvents: true should already be enabled by default

@thomas-lebeau thomas-lebeau merged commit c1b94b4 into main Jan 22, 2025
19 checks passed
@thomas-lebeau thomas-lebeau deleted the thomas.lebeau/e2e-fix-things branch January 22, 2025 15:43
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.

4 participants