@multiplayer-app/session-recorder-browser 1.3.10 → 1.3.11
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 +16 -9
- package/dist/exporters/index.js +1 -1
- package/dist/exporters/index.js.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +16 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/services/api.service.d.ts +2 -2
- package/dist/services/api.service.d.ts.map +1 -1
- package/dist/services/socket.service.d.ts +1 -1
- package/dist/services/socket.service.d.ts.map +1 -1
- package/dist/services/socket.service.js +3 -5
- package/dist/services/socket.service.js.map +1 -1
- package/dist/session-recorder.d.ts +4 -2
- package/dist/session-recorder.d.ts.map +1 -1
- package/dist/session-recorder.js +12 -3
- package/dist/session-recorder.js.map +1 -1
- package/dist/types/session-recorder.d.ts +1 -1
- package/dist/types/session-recorder.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -24654,7 +24654,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
|
24654
24654
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
24655
24655
|
const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
|
|
24656
24656
|
const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
|
|
24657
|
-
const PACKAGE_VERSION_EXPORT = "1.3.
|
|
24657
|
+
const PACKAGE_VERSION_EXPORT = "1.3.11" || 0;
|
|
24658
24658
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
24659
24659
|
const OTEL_IGNORE_URLS = [
|
|
24660
24660
|
// Traces endpoint
|
|
@@ -26737,11 +26737,10 @@ class SocketService extends lib0_observable__WEBPACK_IMPORTED_MODULE_3__.Observa
|
|
|
26737
26737
|
_services_messaging_service__WEBPACK_IMPORTED_MODULE_1__["default"].sendMessage(action, data);
|
|
26738
26738
|
}
|
|
26739
26739
|
emitSocketEvent(name, data) {
|
|
26740
|
-
var _a;
|
|
26741
26740
|
if (this.usePostMessage) {
|
|
26742
26741
|
this.sendViaPostMessage(name, data);
|
|
26743
26742
|
}
|
|
26744
|
-
else if (
|
|
26743
|
+
else if (this.socket && this.isConnected) {
|
|
26745
26744
|
this.socket.emit(name, data);
|
|
26746
26745
|
}
|
|
26747
26746
|
else {
|
|
@@ -26750,15 +26749,14 @@ class SocketService extends lib0_observable__WEBPACK_IMPORTED_MODULE_3__.Observa
|
|
|
26750
26749
|
}
|
|
26751
26750
|
}
|
|
26752
26751
|
flushQueue() {
|
|
26753
|
-
|
|
26754
|
-
while (this.queue.length > 0 && (this.usePostMessage || ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.connected))) {
|
|
26752
|
+
while (this.queue.length > 0 && (this.usePostMessage || this.isConnected)) {
|
|
26755
26753
|
const event = this.queue.shift();
|
|
26756
26754
|
if (!event)
|
|
26757
26755
|
continue;
|
|
26758
26756
|
if (this.usePostMessage) {
|
|
26759
26757
|
this.sendViaPostMessage(event.name, event.data);
|
|
26760
26758
|
}
|
|
26761
|
-
else if (
|
|
26759
|
+
else if (this.socket && this.isConnected) {
|
|
26762
26760
|
this.socket.emit(event.name, event.data);
|
|
26763
26761
|
}
|
|
26764
26762
|
}
|
|
@@ -26909,6 +26907,12 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_14__.Obse
|
|
|
26909
26907
|
set sessionAttributes(attributes) {
|
|
26910
26908
|
this._sessionAttributes = attributes;
|
|
26911
26909
|
}
|
|
26910
|
+
get userAttributes() {
|
|
26911
|
+
return this._userAttributes;
|
|
26912
|
+
}
|
|
26913
|
+
set userAttributes(userAttributes) {
|
|
26914
|
+
this._userAttributes = userAttributes;
|
|
26915
|
+
}
|
|
26912
26916
|
get error() {
|
|
26913
26917
|
return this._error;
|
|
26914
26918
|
}
|
|
@@ -26939,7 +26943,6 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_14__.Obse
|
|
|
26939
26943
|
this._recorder = new _rrweb__WEBPACK_IMPORTED_MODULE_1__.RecorderBrowserSDK();
|
|
26940
26944
|
this._sessionWidget = new _sessionWidget__WEBPACK_IMPORTED_MODULE_8__.SessionWidget();
|
|
26941
26945
|
this._navigationRecorder = new _navigation__WEBPACK_IMPORTED_MODULE_13__.NavigationRecorder();
|
|
26942
|
-
this._userAttributes = undefined;
|
|
26943
26946
|
this._startRequestController = null;
|
|
26944
26947
|
this._isInitialized = false;
|
|
26945
26948
|
// Session ID and state are stored in localStorage
|
|
@@ -26948,6 +26951,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_14__.Obse
|
|
|
26948
26951
|
this._sessionState = null;
|
|
26949
26952
|
this._session = null;
|
|
26950
26953
|
this._sessionAttributes = null;
|
|
26954
|
+
this._userAttributes = null;
|
|
26951
26955
|
/**
|
|
26952
26956
|
* Error message getter and setter
|
|
26953
26957
|
*/
|
|
@@ -27156,6 +27160,9 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_14__.Obse
|
|
|
27156
27160
|
* @param userAttributes - the user attributes to set
|
|
27157
27161
|
*/
|
|
27158
27162
|
setUserAttributes(userAttributes) {
|
|
27163
|
+
if (!this._userAttributes && !userAttributes) {
|
|
27164
|
+
return;
|
|
27165
|
+
}
|
|
27159
27166
|
this._userAttributes = userAttributes;
|
|
27160
27167
|
this._socketService.setUser(this._userAttributes);
|
|
27161
27168
|
}
|
|
@@ -27354,8 +27361,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_14__.Obse
|
|
|
27354
27361
|
const payload = {
|
|
27355
27362
|
sessionAttributes: this.sessionAttributes,
|
|
27356
27363
|
resourceAttributes: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getNavigatorInfo)(),
|
|
27357
|
-
|
|
27358
|
-
|
|
27364
|
+
name: this._getSessionName(),
|
|
27365
|
+
...(this._userAttributes ? { userAttributes: this._userAttributes } : {}),
|
|
27359
27366
|
};
|
|
27360
27367
|
const request = !this.continuousRecording ?
|
|
27361
27368
|
payload : { debugSessionData: payload };
|