@sentry/replay 7.88.0 → 7.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +13 -12
- package/cjs/index.js.map +1 -1
- package/esm/index.js +14 -13
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
- package/types/replay.d.ts.map +1 -1
- package/types/types/replay.d.ts +1 -0
- package/types/types/replay.d.ts.map +1 -1
- package/types/util/addGlobalListeners.d.ts.map +1 -1
- package/types/util/sendReplayRequest.d.ts.map +1 -1
- package/types-ts3.8/types/replay.d.ts +1 -0
package/cjs/index.js
CHANGED
|
@@ -4739,7 +4739,7 @@ function logInfo(message, shouldAddBreadcrumb) {
|
|
|
4739
4739
|
utils.logger.info(message);
|
|
4740
4740
|
|
|
4741
4741
|
if (shouldAddBreadcrumb) {
|
|
4742
|
-
|
|
4742
|
+
addLogBreadcrumb(message);
|
|
4743
4743
|
}
|
|
4744
4744
|
}
|
|
4745
4745
|
|
|
@@ -4758,14 +4758,13 @@ function logInfoNextTick(message, shouldAddBreadcrumb) {
|
|
|
4758
4758
|
// Wait a tick here to avoid race conditions for some initial logs
|
|
4759
4759
|
// which may be added before replay is initialized
|
|
4760
4760
|
setTimeout(() => {
|
|
4761
|
-
|
|
4761
|
+
addLogBreadcrumb(message);
|
|
4762
4762
|
}, 0);
|
|
4763
4763
|
}
|
|
4764
4764
|
}
|
|
4765
4765
|
|
|
4766
|
-
function
|
|
4767
|
-
|
|
4768
|
-
hub.addBreadcrumb(
|
|
4766
|
+
function addLogBreadcrumb(message) {
|
|
4767
|
+
core.addBreadcrumb(
|
|
4769
4768
|
{
|
|
4770
4769
|
category: 'console',
|
|
4771
4770
|
data: {
|
|
@@ -5945,7 +5944,7 @@ function shouldFilterRequest(replay, url) {
|
|
|
5945
5944
|
return false;
|
|
5946
5945
|
}
|
|
5947
5946
|
|
|
5948
|
-
return core.isSentryRequestUrl(url, core.
|
|
5947
|
+
return core.isSentryRequestUrl(url, core.getClient());
|
|
5949
5948
|
}
|
|
5950
5949
|
|
|
5951
5950
|
/** Add a performance entry breadcrumb */
|
|
@@ -7023,7 +7022,7 @@ function normalizeConsoleBreadcrumb(
|
|
|
7023
7022
|
*/
|
|
7024
7023
|
function addGlobalListeners(replay) {
|
|
7025
7024
|
// Listeners from core SDK //
|
|
7026
|
-
const scope = core.
|
|
7025
|
+
const scope = core.getCurrentScope();
|
|
7027
7026
|
const client = core.getClient();
|
|
7028
7027
|
|
|
7029
7028
|
scope.addScopeListener(handleScopeListener(replay));
|
|
@@ -7456,9 +7455,8 @@ async function sendReplayRequest({
|
|
|
7456
7455
|
|
|
7457
7456
|
const { urls, errorIds, traceIds, initialTimestamp } = eventContext;
|
|
7458
7457
|
|
|
7459
|
-
const
|
|
7460
|
-
const
|
|
7461
|
-
const scope = hub.getScope();
|
|
7458
|
+
const client = core.getClient();
|
|
7459
|
+
const scope = core.getCurrentScope();
|
|
7462
7460
|
const transport = client && client.getTransport();
|
|
7463
7461
|
const dsn = client && client.getDsn();
|
|
7464
7462
|
|
|
@@ -7962,7 +7960,10 @@ class ReplayContainer {
|
|
|
7962
7960
|
...(canvas && {
|
|
7963
7961
|
recordCanvas: true,
|
|
7964
7962
|
sampling: { canvas: canvas.fps || 4 },
|
|
7965
|
-
dataURLOptions: {
|
|
7963
|
+
dataURLOptions: {
|
|
7964
|
+
type: canvas.type || 'image/webp',
|
|
7965
|
+
quality: canvas.quality || 0.6,
|
|
7966
|
+
},
|
|
7966
7967
|
getCanvasManager: canvas.manager,
|
|
7967
7968
|
}),
|
|
7968
7969
|
});
|
|
@@ -8317,7 +8318,7 @@ class ReplayContainer {
|
|
|
8317
8318
|
* This is only available if performance is enabled, and if an instrumented router is used.
|
|
8318
8319
|
*/
|
|
8319
8320
|
getCurrentRoute() {
|
|
8320
|
-
const lastTransaction = this.lastTransaction || core.
|
|
8321
|
+
const lastTransaction = this.lastTransaction || core.getCurrentScope().getTransaction();
|
|
8321
8322
|
if (!lastTransaction || !['route', 'custom'].includes(lastTransaction.metadata.source)) {
|
|
8322
8323
|
return undefined;
|
|
8323
8324
|
}
|