@multiplayer-app/session-recorder-browser 1.3.21 → 1.3.22

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/index.js CHANGED
@@ -24152,7 +24152,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
24152
24152
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
24153
24153
  const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
24154
24154
  const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
24155
- const PACKAGE_VERSION_EXPORT = "1.3.21" || 0;
24155
+ const PACKAGE_VERSION_EXPORT = "1.3.22" || 0;
24156
24156
  // Regex patterns for OpenTelemetry ignore URLs
24157
24157
  const OTEL_IGNORE_URLS = [
24158
24158
  // Traces endpoint
@@ -25136,6 +25136,7 @@ class TracerBrowserSDK {
25136
25136
  this.clientId = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionRecorderSdk.getIdGenerator(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.MULTIPLAYER_TRACE_CLIENT_ID_LENGTH)();
25137
25137
  const { application, version, environment } = this.config;
25138
25138
  this.idGenerator = new _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionRecorderIdGenerator();
25139
+ this.setSessionId('', _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.SESSION_CACHE);
25139
25140
  this.exporter = new _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionRecorderBrowserTraceExporter({
25140
25141
  apiKey: options.apiKey,
25141
25142
  url: (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getExporterEndpoint)(options.exporterEndpoint),
@@ -25275,7 +25276,7 @@ class TracerBrowserSDK {
25275
25276
  if (!this.tracerProvider) {
25276
25277
  throw new Error('Configuration not initialized. Call init() before start().');
25277
25278
  }
25278
- this.setSessionId('');
25279
+ this.setSessionId('', _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionType.SESSION_CACHE);
25279
25280
  }
25280
25281
  setApiKey(apiKey) {
25281
25282
  if (!this.exporter) {
@@ -27713,13 +27714,11 @@ class SessionRecorder extends lib0_observable__WEBPACK_IMPORTED_MODULE_16__.Obse
27713
27714
  }, 5000);
27714
27715
  });
27715
27716
  this._socketService.on(_config__WEBPACK_IMPORTED_MODULE_5__.REMOTE_SESSION_RECORDING_START, (payload) => {
27716
- console.log('REMOTE_SESSION_RECORDING_START', payload);
27717
27717
  if (this.sessionState === _types__WEBPACK_IMPORTED_MODULE_4__.SessionState.stopped) {
27718
27718
  this.start();
27719
27719
  }
27720
27720
  });
27721
27721
  this._socketService.on(_config__WEBPACK_IMPORTED_MODULE_5__.REMOTE_SESSION_RECORDING_STOP, (payload) => {
27722
- console.log('REMOTE_SESSION_RECORDING_STOP', payload);
27723
27722
  if (this.sessionState !== _types__WEBPACK_IMPORTED_MODULE_4__.SessionState.stopped) {
27724
27723
  this.stop();
27725
27724
  }
@@ -29976,7 +29975,9 @@ var SessionRecorderIdGenerator = /** @class */ (function () {
29976
29975
  }
29977
29976
  SessionRecorderIdGenerator.prototype.generateTraceId = function () {
29978
29977
  var traceId = this.generateLongId();
29979
- if (!this.sessionShortId && !this.sessionType) {
29978
+ if (!this.sessionShortId
29979
+ && !this.sessionType
29980
+ && !this.clientId) {
29980
29981
  return traceId;
29981
29982
  }
29982
29983
  var sessionTypePrefix = _constants_constants_base__WEBPACK_IMPORTED_MODULE_2__.MULTIPLAYER_TRACE_PREFIX_MAP[this.sessionType];