@multiplayer-app/session-recorder-browser 2.0.55 → 2.0.58
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 +10 -5
- package/dist/exporters/index.js +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +10 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/session-recorder.d.ts +1 -0
- package/dist/session-recorder.d.ts.map +1 -1
- package/dist/session-recorder.js +10 -5
- package/dist/session-recorder.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -24436,7 +24436,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
|
24436
24436
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
24437
24437
|
const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
|
|
24438
24438
|
const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
|
|
24439
|
-
const PACKAGE_VERSION_EXPORT = "2.0.
|
|
24439
|
+
const PACKAGE_VERSION_EXPORT = "2.0.58" || 0;
|
|
24440
24440
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
24441
24441
|
const OTEL_IGNORE_URLS = [
|
|
24442
24442
|
// Traces endpoint
|
|
@@ -27969,8 +27969,8 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
|
|
|
27969
27969
|
this._tracer.exportTraces(spans.map((s) => s.span)),
|
|
27970
27970
|
this._apiService.exportEvents(sessionId, { events: events.map((e) => e.event) }),
|
|
27971
27971
|
this._apiService.updateSessionAttributes(sessionId, {
|
|
27972
|
-
startedAt:
|
|
27973
|
-
stoppedAt:
|
|
27972
|
+
startedAt: this._toCrashBufferSessionIso(startedAt),
|
|
27973
|
+
stoppedAt: this._toCrashBufferSessionIso(stoppedAt),
|
|
27974
27974
|
sessionAttributes: this.sessionAttributes,
|
|
27975
27975
|
resourceAttributes: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getNavigatorInfo)(),
|
|
27976
27976
|
userAttributes: this._userAttributes || undefined,
|
|
@@ -27986,6 +27986,9 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
|
|
|
27986
27986
|
_eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_READY_EVENT, sessionId);
|
|
27987
27987
|
}
|
|
27988
27988
|
}
|
|
27989
|
+
_toCrashBufferSessionIso(ts) {
|
|
27990
|
+
return new Date(ts - new Date().getTimezoneOffset() * 60 * 1000).toISOString();
|
|
27991
|
+
}
|
|
27989
27992
|
/**
|
|
27990
27993
|
* @description Check if session should be started/stopped automatically
|
|
27991
27994
|
* @param {ISession} [sessionPayload]
|
|
@@ -28202,7 +28205,7 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
|
|
|
28202
28205
|
* Start tracing and recording for the session
|
|
28203
28206
|
*/
|
|
28204
28207
|
_start() {
|
|
28205
|
-
var _a;
|
|
28208
|
+
var _a, _b;
|
|
28206
28209
|
this.sessionState = _types__WEBPACK_IMPORTED_MODULE_4__.SessionState.started;
|
|
28207
28210
|
// eslint-disable-next-line no-self-assign
|
|
28208
28211
|
this.sessionType = this.sessionType;
|
|
@@ -28211,9 +28214,11 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
|
|
|
28211
28214
|
void this._recorder.restart(this.sessionId, this.sessionType);
|
|
28212
28215
|
this._navigationRecorder.start({ sessionId: this.sessionId, sessionType: this.sessionType });
|
|
28213
28216
|
if (this.session) {
|
|
28214
|
-
_eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_STARTED_EVENT, this.session);
|
|
28215
28217
|
this._socketService.subscribeToSession(this.session);
|
|
28216
28218
|
this._sessionWidget.seconds = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getTimeDifferenceInSeconds)((_a = this.session) === null || _a === void 0 ? void 0 : _a.startedAt);
|
|
28219
|
+
if ((_b = this.session) === null || _b === void 0 ? void 0 : _b.url) {
|
|
28220
|
+
_eventBus__WEBPACK_IMPORTED_MODULE_7__.recorderEventBus.emit(_config__WEBPACK_IMPORTED_MODULE_5__.SESSION_AUTO_CREATED, this.session.url);
|
|
28221
|
+
}
|
|
28217
28222
|
}
|
|
28218
28223
|
}
|
|
28219
28224
|
/**
|