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

✨ [POC] Before error session replay recording mode #3038

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

N-Boutaib
Copy link
Contributor

Motivation

Changes

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.


if (!canUseEventBridge()) {
const initSegemntCollection = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const initSegemntCollection = () => {
const initSegmentCollection = () => {

let shouldCache = session.sessionReplay === SessionReplayState.OFF

const { addRecord: addToCache, getRecords: getFromCache } = startRecordsCaching()
const { addRecord: addToSegment } = initSegemntCollection()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const { addRecord: addToSegment } = initSegemntCollection()
const { addRecord: addToSegment } = initSegmentCollection()

Comment on lines 62 to 68
const flushCachedRecords = () => {
if (shouldCache) {
shouldCache = false
const records = getFromCache()
records.forEach(addToSegment)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const flushCachedRecords = () => {
if (shouldCache) {
shouldCache = false
const records = getFromCache()
records.forEach(addToSegment)
}
}
const flushCachedRecords = () => {
if (!shouldCache) {
return
}
shouldCache = false
const records = getFromCache()
records.forEach(addToSegment)
}

Copy link

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 161.95 KiB 162.28 KiB 333 B +0.20%
Logs 56.03 KiB 56.03 KiB 0 B 0.00%
Rum Slim 110.52 KiB 110.52 KiB 0 B 0.00%
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) 𝚫
addglobalcontext 0.001 0.001 -0.000
addaction 0.029 0.030 0.000
addtiming 0.001 0.001 -0.000
adderror 0.032 0.029 -0.004
startstopsessionreplayrecording 0.814 0.751 -0.063
startview 0.933 0.928 -0.005
logmessage 0.025 0.018 -0.007
🧠 Memory Performance
Action Name Base Consumption Memory (bytes) Local Consumption Memory (bytes) 𝚫 (bytes)
addglobalcontext 7.77 KiB 10.90 KiB 3.13 KiB
addaction 39.00 KiB 41.32 KiB 2.33 KiB
addtiming 5.70 KiB 10.15 KiB 4.45 KiB
adderror 43.25 KiB 46.45 KiB 3.20 KiB
startstopsessionreplayrecording 4.03 KiB 32.17 KiB 28.14 KiB
startview 436.14 KiB 588.05 KiB 151.90 KiB
logmessage 40.39 KiB 42.28 KiB 1.89 KiB

🔗 RealWorld

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.

2 participants