@multiplayer-app/session-recorder-browser 1.2.7 → 1.2.8
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/dist/browser/index.js +24 -24
- package/dist/browser/index.js.map +1 -1
- package/dist/exporters/index.js +1 -1
- package/dist/exporters/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/rrweb/index.d.ts.map +1 -1
- package/dist/sessionRecorder.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -25245,7 +25245,7 @@ const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000;
|
|
|
25245
25245
|
const SESSION_RESPONSE = 'multiplayer-debug-session-response';
|
|
25246
25246
|
const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
25247
25247
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
25248
|
-
const PACKAGE_VERSION_EXPORT = "1.2.
|
|
25248
|
+
const PACKAGE_VERSION_EXPORT = "1.2.8" || 0;
|
|
25249
25249
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
25250
25250
|
const OTEL_IGNORE_URLS = [
|
|
25251
25251
|
// Traces endpoint
|
|
@@ -25614,7 +25614,7 @@ function setupListeners(sessionRecorder) {
|
|
|
25614
25614
|
sessionRecorder.init(payload);
|
|
25615
25615
|
});
|
|
25616
25616
|
_services_messaging_service__WEBPACK_IMPORTED_MODULE_0__["default"].on('start', (payload) => {
|
|
25617
|
-
sessionRecorder.start(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.
|
|
25617
|
+
sessionRecorder.start(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.MANUAL, payload);
|
|
25618
25618
|
});
|
|
25619
25619
|
_services_messaging_service__WEBPACK_IMPORTED_MODULE_0__["default"].on('end', (payload) => {
|
|
25620
25620
|
sessionRecorder.stop(payload);
|
|
@@ -25902,7 +25902,7 @@ class TracerBrowserSDK {
|
|
|
25902
25902
|
this.allowedElements = new Set(['A', 'BUTTON']);
|
|
25903
25903
|
this.sessionId = '';
|
|
25904
25904
|
}
|
|
25905
|
-
setSessionId(sessionId, sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.
|
|
25905
|
+
setSessionId(sessionId, sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.MANUAL) {
|
|
25906
25906
|
this.sessionId = sessionId;
|
|
25907
25907
|
this.idGenerator.setSessionId(sessionId, sessionType);
|
|
25908
25908
|
}
|
|
@@ -26395,7 +26395,7 @@ class RecorderBrowserSDK {
|
|
|
26395
26395
|
this._stoppedAt = v;
|
|
26396
26396
|
}
|
|
26397
26397
|
constructor() {
|
|
26398
|
-
this.
|
|
26398
|
+
this.restartInterval = null;
|
|
26399
26399
|
this._startedAt = '';
|
|
26400
26400
|
this._stoppedAt = '';
|
|
26401
26401
|
}
|
|
@@ -26420,7 +26420,7 @@ class RecorderBrowserSDK {
|
|
|
26420
26420
|
if (!this.config) {
|
|
26421
26421
|
throw new Error('Configuration not initialized. Call init() before start().');
|
|
26422
26422
|
}
|
|
26423
|
-
const
|
|
26423
|
+
const restartInterval = sessionType === _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.CONTINUOUS ? _config__WEBPACK_IMPORTED_MODULE_4__.CONTINUOUS_DEBUGGING_TIMEOUT : 0;
|
|
26424
26424
|
this.startedAt = new Date().toISOString();
|
|
26425
26425
|
// Build masking configuration
|
|
26426
26426
|
const maskingConfig = this.config.masking || {};
|
|
@@ -26475,10 +26475,10 @@ class RecorderBrowserSDK {
|
|
|
26475
26475
|
});
|
|
26476
26476
|
// It will sent full snapshot again but it will fix missing first snapshot issue
|
|
26477
26477
|
rrweb__WEBPACK_IMPORTED_MODULE_6__.record.takeFullSnapshot();
|
|
26478
|
-
if (
|
|
26479
|
-
this.
|
|
26478
|
+
if (restartInterval > 0) {
|
|
26479
|
+
this.restartInterval = setInterval(() => {
|
|
26480
26480
|
rrweb__WEBPACK_IMPORTED_MODULE_6__.record.takeFullSnapshot();
|
|
26481
|
-
},
|
|
26481
|
+
}, restartInterval);
|
|
26482
26482
|
}
|
|
26483
26483
|
}
|
|
26484
26484
|
/**
|
|
@@ -26492,10 +26492,10 @@ class RecorderBrowserSDK {
|
|
|
26492
26492
|
/**
|
|
26493
26493
|
* Clears the restart timeout.
|
|
26494
26494
|
*/
|
|
26495
|
-
|
|
26496
|
-
if (this.
|
|
26497
|
-
|
|
26498
|
-
this.
|
|
26495
|
+
clearRestartInterval() {
|
|
26496
|
+
if (this.restartInterval) {
|
|
26497
|
+
clearInterval(this.restartInterval);
|
|
26498
|
+
this.restartInterval = null;
|
|
26499
26499
|
}
|
|
26500
26500
|
}
|
|
26501
26501
|
/**
|
|
@@ -26505,7 +26505,7 @@ class RecorderBrowserSDK {
|
|
|
26505
26505
|
var _a, _b;
|
|
26506
26506
|
(_a = this.stopFn) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
26507
26507
|
(_b = this.exporter) === null || _b === void 0 ? void 0 : _b.close();
|
|
26508
|
-
this.
|
|
26508
|
+
this.clearRestartInterval();
|
|
26509
26509
|
}
|
|
26510
26510
|
subscribeToSession(session) {
|
|
26511
26511
|
var _a;
|
|
@@ -26892,7 +26892,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
26892
26892
|
this._isInitialized = false;
|
|
26893
26893
|
// Session ID and state are stored in localStorage
|
|
26894
26894
|
this._sessionId = null;
|
|
26895
|
-
this._sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
26895
|
+
this._sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
26896
26896
|
this._sessionState = null;
|
|
26897
26897
|
this._session = null;
|
|
26898
26898
|
this._sessionAttributes = null;
|
|
@@ -26911,7 +26911,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
26911
26911
|
this.session = null;
|
|
26912
26912
|
this.sessionId = null;
|
|
26913
26913
|
this.sessionState = null;
|
|
26914
|
-
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
26914
|
+
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
26915
26915
|
}
|
|
26916
26916
|
this._configs = {
|
|
26917
26917
|
..._config__WEBPACK_IMPORTED_MODULE_4__.BASE_CONFIG,
|
|
@@ -26988,11 +26988,11 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
26988
26988
|
* @param type - the type of session to start
|
|
26989
26989
|
* @param session - the session to start
|
|
26990
26990
|
*/
|
|
26991
|
-
start(type = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
26991
|
+
start(type = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL, session) {
|
|
26992
26992
|
this._checkOperation('start');
|
|
26993
26993
|
// If continuous recording is disabled, force plain mode
|
|
26994
26994
|
if (type === _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.CONTINUOUS && !this._configs.showContinuousRecording) {
|
|
26995
|
-
type = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
26995
|
+
type = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
26996
26996
|
}
|
|
26997
26997
|
this.sessionType = type;
|
|
26998
26998
|
this._startRequestController = new AbortController();
|
|
@@ -27013,7 +27013,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27013
27013
|
this._stop();
|
|
27014
27014
|
if (this.continuousRecording) {
|
|
27015
27015
|
await this._apiService.stopContinuousDebugSession(this.sessionId);
|
|
27016
|
-
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
27016
|
+
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
27017
27017
|
}
|
|
27018
27018
|
else {
|
|
27019
27019
|
const request = {
|
|
@@ -27062,7 +27062,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27062
27062
|
this._stop();
|
|
27063
27063
|
if (this.continuousRecording) {
|
|
27064
27064
|
await this._apiService.stopContinuousDebugSession(this.sessionId);
|
|
27065
|
-
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
27065
|
+
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
27066
27066
|
}
|
|
27067
27067
|
else {
|
|
27068
27068
|
await this._apiService.cancelSession(this.sessionId);
|
|
@@ -27129,7 +27129,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27129
27129
|
this._sessionWidget.on('toggle', (state, comment) => {
|
|
27130
27130
|
this.error = '';
|
|
27131
27131
|
if (state) {
|
|
27132
|
-
this.start(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
27132
|
+
this.start(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL);
|
|
27133
27133
|
}
|
|
27134
27134
|
else {
|
|
27135
27135
|
this.stop(comment === null || comment === void 0 ? void 0 : comment.trim());
|
|
@@ -27211,14 +27211,14 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_13__.Obse
|
|
|
27211
27211
|
if (session) {
|
|
27212
27212
|
session.sessionType = this.continuousRecording
|
|
27213
27213
|
? _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.CONTINUOUS
|
|
27214
|
-
: _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
27214
|
+
: _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
27215
27215
|
this._setupSessionAndStart(session, false);
|
|
27216
27216
|
}
|
|
27217
27217
|
}
|
|
27218
27218
|
catch (error) {
|
|
27219
27219
|
this.error = error.message;
|
|
27220
27220
|
if (this.continuousRecording) {
|
|
27221
|
-
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.
|
|
27221
|
+
this.sessionType = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_11__.SessionType.MANUAL;
|
|
27222
27222
|
}
|
|
27223
27223
|
}
|
|
27224
27224
|
}
|
|
@@ -29315,7 +29315,7 @@ var SessionRecorderIdGenerator = /** @class */ (function () {
|
|
|
29315
29315
|
this.generateLongId = (0,_sdk__WEBPACK_IMPORTED_MODULE_2__.getIdGenerator)(16);
|
|
29316
29316
|
this.generateShortId = (0,_sdk__WEBPACK_IMPORTED_MODULE_2__.getIdGenerator)(8);
|
|
29317
29317
|
this.sessionShortId = '';
|
|
29318
|
-
this.sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.
|
|
29318
|
+
this.sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.MANUAL;
|
|
29319
29319
|
}
|
|
29320
29320
|
SessionRecorderIdGenerator.prototype.generateTraceId = function () {
|
|
29321
29321
|
var traceId = this.generateLongId();
|
|
@@ -29338,7 +29338,7 @@ var SessionRecorderIdGenerator = /** @class */ (function () {
|
|
|
29338
29338
|
return this.generateShortId();
|
|
29339
29339
|
};
|
|
29340
29340
|
SessionRecorderIdGenerator.prototype.setSessionId = function (sessionShortId, sessionType) {
|
|
29341
|
-
if (sessionType === void 0) { sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.
|
|
29341
|
+
if (sessionType === void 0) { sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.MANUAL; }
|
|
29342
29342
|
this.sessionShortId = sessionShortId;
|
|
29343
29343
|
this.sessionType = sessionType;
|
|
29344
29344
|
};
|