browser-sdk
browser-sdk copied to clipboard
✨ [RUM-3837] Force replay recording on sampled out sessions
Motivation
Allow session replay recording on sampled out sessions
Changes
On the RUM's public API, session replay recording can be forced even if the session is sampled out for replay. This is achieved by passing { force: true }
to DD_RUM.startSessionReplayRecording
function.
When this method is called with force
option, we need to keep recording until the session ends. To achieve that:
- A new tracking type is added
- The cookie is updated to reflect that change, with the new tracking type
- Session cache and history context are synchronised across all tabs
Testing
- [x] Local
- [x] Staging
- [x] Unit
- [x] End to end
I have gone over the contributing documentation.
Codecov Report
Attention: Patch coverage is 97.72727%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 93.28%. Comparing base (
5249c39
) to head (b7323fc
). Report is 8 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
packages/rum-core/src/domain/rumSessionManager.ts | 85.71% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2684 +/- ##
==========================================
+ Coverage 93.26% 93.28% +0.01%
==========================================
Files 241 241
Lines 7028 7057 +29
Branches 1553 1569 +16
==========================================
+ Hits 6555 6583 +28
- Misses 473 474 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Bundles Sizes Evolution
📦 Bundle Name | Base Size | Local Size | 𝚫 | 𝚫% | Status |
---|---|---|---|---|---|
Rum | 157.47 KiB | 158.10 KiB | 643 B | +0.40% | ✅ |
Logs | 56.09 KiB | 56.40 KiB | 319 B | +0.56% | ✅ |
Rum Slim | 103.96 KiB | 104.51 KiB | 563 B | +0.53% | ✅ |
Worker | 25.21 KiB | 25.21 KiB | 0 B | 0.00% | ✅ |
🚀 CPU Performance
Action Name | Base Average Cpu Time (ms) | Local Average Cpu Time (ms) | 𝚫 |
---|---|---|---|
adderror | 0.031 | 0.032 | 0.001 |
addaction | 0.016 | 0.015 | -0.001 |
logmessage | 0.005 | 0.006 | 0.001 |
startview | 0.920 | 0.848 | -0.072 |
startstopsessionreplayrecording | 1.017 | 0.762 | -0.255 |
addtiming | 0.001 | 0.001 | -0.000 |
addglobalcontext | 0.001 | 0.001 | -0.000 |