@sentry/replay
Advanced tools
Comparing version 0.2.0-7 to 0.2.0-8
@@ -160,2 +160,19 @@ import * as Sentry from '@sentry/browser'; | ||
} | ||
function createMemoryEntry(memoryEntry) { | ||
var jsHeapSizeLimit = memoryEntry.jsHeapSizeLimit, totalJSHeapSize = memoryEntry.totalJSHeapSize, usedJSHeapSize = memoryEntry.usedJSHeapSize; | ||
var time = getAbsoluteTime(Date.now()); | ||
return { | ||
type: 'memory', | ||
name: 'memory', | ||
start: time, | ||
end: time, | ||
data: { | ||
memory: { | ||
jsHeapSizeLimit: jsHeapSizeLimit, | ||
totalJSHeapSize: totalJSHeapSize, | ||
usedJSHeapSize: usedJSHeapSize, | ||
}, | ||
}, | ||
}; | ||
} | ||
@@ -413,2 +430,4 @@ var REPLAY_SESSION_KEY = 'sentryReplaySession'; | ||
}); | ||
// not fully initialized and the event will not get properly sent to Sentry | ||
this.createReplayEvent(); | ||
record(__assign(__assign({}, this.rrwebRecordOptions), { emit: function (event, isCheckout) { | ||
@@ -467,4 +486,2 @@ // We want to batch uploads of replay events. Save events only if | ||
this.addListeners(); | ||
// not fully initialized and the event will not get properly sent to Sentry | ||
this.createReplayEvent(); | ||
}; | ||
@@ -573,2 +590,8 @@ /** | ||
var entryEvents = createPerformanceEntries(entries); | ||
// window.performance.memory is a non-standard API and doesn't work on all browsers | ||
// so we check before creating the event. | ||
if ('memory' in window.performance) { | ||
// @ts-expect-error memory doesn't exist on type Performance as the API is non-standard | ||
entryEvents.push(createMemoryEntry(window.performance.memory)); | ||
} | ||
// This current implementation is to create spans on the transaction referenced in `this.replayEvent` | ||
@@ -575,0 +598,0 @@ this.createPerformanceSpans(entryEvents); |
@@ -184,2 +184,19 @@ 'use strict'; | ||
} | ||
function createMemoryEntry(memoryEntry) { | ||
var jsHeapSizeLimit = memoryEntry.jsHeapSizeLimit, totalJSHeapSize = memoryEntry.totalJSHeapSize, usedJSHeapSize = memoryEntry.usedJSHeapSize; | ||
var time = getAbsoluteTime(Date.now()); | ||
return { | ||
type: 'memory', | ||
name: 'memory', | ||
start: time, | ||
end: time, | ||
data: { | ||
memory: { | ||
jsHeapSizeLimit: jsHeapSizeLimit, | ||
totalJSHeapSize: totalJSHeapSize, | ||
usedJSHeapSize: usedJSHeapSize, | ||
}, | ||
}, | ||
}; | ||
} | ||
@@ -437,2 +454,4 @@ var REPLAY_SESSION_KEY = 'sentryReplaySession'; | ||
}); | ||
// not fully initialized and the event will not get properly sent to Sentry | ||
this.createReplayEvent(); | ||
rrweb.record(__assign(__assign({}, this.rrwebRecordOptions), { emit: function (event, isCheckout) { | ||
@@ -491,4 +510,2 @@ // We want to batch uploads of replay events. Save events only if | ||
this.addListeners(); | ||
// not fully initialized and the event will not get properly sent to Sentry | ||
this.createReplayEvent(); | ||
}; | ||
@@ -597,2 +614,8 @@ /** | ||
var entryEvents = createPerformanceEntries(entries); | ||
// window.performance.memory is a non-standard API and doesn't work on all browsers | ||
// so we check before creating the event. | ||
if ('memory' in window.performance) { | ||
// @ts-expect-error memory doesn't exist on type Performance as the API is non-standard | ||
entryEvents.push(createMemoryEntry(window.performance.memory)); | ||
} | ||
// This current implementation is to create spans on the transaction referenced in `this.replayEvent` | ||
@@ -599,0 +622,0 @@ this.createPerformanceSpans(entryEvents); |
{ | ||
"name": "@sentry/replay", | ||
"version": "0.2.0-7", | ||
"version": "0.2.0-8", | ||
"description": "User replays for Sentry", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148816
1642