@multiplayer-app/session-recorder-browser 1.0.1-alpha.2 → 1.0.1-alpha.3
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
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.0.1-alpha.
|
|
25248
|
+
const PACKAGE_VERSION_EXPORT = "1.0.1-alpha.3" || 0;
|
|
25249
25249
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
25250
25250
|
const OTEL_IGNORE_URLS = [
|
|
25251
25251
|
// Traces endpoint
|
|
@@ -29287,62 +29287,46 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29287
29287
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29288
29288
|
/* harmony export */ SessionRecorderIdGenerator: () => (/* binding */ SessionRecorderIdGenerator)
|
|
29289
29289
|
/* harmony export */ });
|
|
29290
|
-
/* harmony import */ var _opentelemetry_sdk_trace_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @opentelemetry/sdk-trace-base */ "../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/browser/RandomIdGenerator.js");
|
|
29291
29290
|
/* harmony import */ var _type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./type */ "../session-recorder-common/dist/esm/type/index.js");
|
|
29292
29291
|
/* harmony import */ var _constants_constants_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants/constants.base */ "../session-recorder-common/dist/esm/constants/constants.base.js");
|
|
29293
29292
|
/* harmony import */ var _sdk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sdk */ "../session-recorder-common/dist/esm/sdk/index.js");
|
|
29294
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
29295
|
-
var extendStatics = function (d, b) {
|
|
29296
|
-
extendStatics = Object.setPrototypeOf ||
|
|
29297
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
29298
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
29299
|
-
return extendStatics(d, b);
|
|
29300
|
-
};
|
|
29301
|
-
return function (d, b) {
|
|
29302
|
-
if (typeof b !== "function" && b !== null)
|
|
29303
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
29304
|
-
extendStatics(d, b);
|
|
29305
|
-
function __() { this.constructor = d; }
|
|
29306
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
29307
|
-
};
|
|
29308
|
-
})();
|
|
29309
|
-
|
|
29310
29293
|
|
|
29311
29294
|
|
|
29312
29295
|
|
|
29313
|
-
var SessionRecorderIdGenerator = /** @class */ (function (
|
|
29314
|
-
__extends(SessionRecorderIdGenerator, _super);
|
|
29296
|
+
var SessionRecorderIdGenerator = /** @class */ (function () {
|
|
29315
29297
|
function SessionRecorderIdGenerator() {
|
|
29316
|
-
|
|
29317
|
-
|
|
29318
|
-
|
|
29319
|
-
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
|
|
29326
|
-
|
|
29327
|
-
|
|
29328
|
-
|
|
29329
|
-
|
|
29330
|
-
|
|
29331
|
-
var prefix = "".concat(sessionTypePrefix).concat(_this.sessionShortId);
|
|
29332
|
-
var sessionTraceId = "".concat(prefix).concat(traceId.substring(prefix.length, traceId.length));
|
|
29333
|
-
return sessionTraceId;
|
|
29298
|
+
this.generateLongId = (0,_sdk__WEBPACK_IMPORTED_MODULE_2__.getIdGenerator)(16);
|
|
29299
|
+
this.generateShortId = (0,_sdk__WEBPACK_IMPORTED_MODULE_2__.getIdGenerator)(8);
|
|
29300
|
+
this.sessionShortId = '';
|
|
29301
|
+
this.sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.PLAIN;
|
|
29302
|
+
}
|
|
29303
|
+
SessionRecorderIdGenerator.prototype.generateTraceId = function () {
|
|
29304
|
+
var traceId = this.generateLongId();
|
|
29305
|
+
if (this.sessionShortId) {
|
|
29306
|
+
var sessionTypePrefix = '';
|
|
29307
|
+
switch (this.sessionType) {
|
|
29308
|
+
case _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.CONTINUOUS:
|
|
29309
|
+
sessionTypePrefix = _constants_constants_base__WEBPACK_IMPORTED_MODULE_1__.MULTIPLAYER_TRACE_CONTINUOUS_DEBUG_PREFIX;
|
|
29310
|
+
break;
|
|
29311
|
+
default:
|
|
29312
|
+
sessionTypePrefix = _constants_constants_base__WEBPACK_IMPORTED_MODULE_1__.MULTIPLAYER_TRACE_DEBUG_PREFIX;
|
|
29334
29313
|
}
|
|
29335
|
-
|
|
29336
|
-
|
|
29337
|
-
|
|
29338
|
-
|
|
29314
|
+
var prefix = "".concat(sessionTypePrefix).concat(this.sessionShortId);
|
|
29315
|
+
var sessionTraceId = "".concat(prefix).concat(traceId.substring(prefix.length, traceId.length));
|
|
29316
|
+
return sessionTraceId;
|
|
29317
|
+
}
|
|
29318
|
+
return traceId;
|
|
29319
|
+
};
|
|
29320
|
+
SessionRecorderIdGenerator.prototype.generateSpanId = function () {
|
|
29321
|
+
return this.generateShortId();
|
|
29322
|
+
};
|
|
29339
29323
|
SessionRecorderIdGenerator.prototype.setSessionId = function (sessionShortId, sessionType) {
|
|
29340
29324
|
if (sessionType === void 0) { sessionType = _type__WEBPACK_IMPORTED_MODULE_0__.SessionType.PLAIN; }
|
|
29341
29325
|
this.sessionShortId = sessionShortId;
|
|
29342
29326
|
this.sessionType = sessionType;
|
|
29343
29327
|
};
|
|
29344
29328
|
return SessionRecorderIdGenerator;
|
|
29345
|
-
}(
|
|
29329
|
+
}());
|
|
29346
29330
|
|
|
29347
29331
|
//# sourceMappingURL=SessionRecorderIdGenerator.js.map
|
|
29348
29332
|
|