@multiplayer-app/session-recorder-browser 1.2.1 → 1.2.4
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/LICENSE +0 -1
- package/README.md +143 -470
- package/dist/browser/index.js +6 -14
- 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/otel/helpers.d.ts.map +1 -1
- package/dist/types/sessionRecorder.d.ts.map +1 -1
- package/docs/img/header-js.png +0 -0
- package/package.json +9 -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.4" || 0;
|
|
25249
25249
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
25250
25250
|
const OTEL_IGNORE_URLS = [
|
|
25251
25251
|
// Traces endpoint
|
|
@@ -25289,7 +25289,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25289
25289
|
const { mask, sensitiveFields, sensitiveHeaders } = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.SessionRecorderSdk;
|
|
25290
25290
|
const DEFAULT_MASKING_CONFIG = {
|
|
25291
25291
|
maskAllInputs: true,
|
|
25292
|
-
|
|
25292
|
+
isContentMaskingEnabled: true,
|
|
25293
25293
|
maskBody: mask(sensitiveFields),
|
|
25294
25294
|
maskHeaders: mask(sensitiveHeaders),
|
|
25295
25295
|
maskBodyFieldsList: sensitiveFields,
|
|
@@ -25439,7 +25439,7 @@ const getMaskingConfig = (masking) => {
|
|
|
25439
25439
|
maskBodyFieldsList,
|
|
25440
25440
|
headersToInclude: (0,_validators__WEBPACK_IMPORTED_MODULE_1__.isValidArray)(masking.headersToInclude, (_b = baseMasking.headersToInclude) !== null && _b !== void 0 ? _b : []),
|
|
25441
25441
|
headersToExclude: (0,_validators__WEBPACK_IMPORTED_MODULE_1__.isValidArray)(masking.headersToExclude, (_c = baseMasking.headersToExclude) !== null && _c !== void 0 ? _c : []),
|
|
25442
|
-
|
|
25442
|
+
isContentMaskingEnabled: (0,_validators__WEBPACK_IMPORTED_MODULE_1__.isValidBoolean)(masking.isContentMaskingEnabled, (_d = baseMasking.isContentMaskingEnabled) !== null && _d !== void 0 ? _d : true),
|
|
25443
25443
|
maskBody: (0,_validators__WEBPACK_IMPORTED_MODULE_1__.isValidFunction)(masking.maskBody, mask(maskBodyFieldsList)),
|
|
25444
25444
|
maskHeaders: (0,_validators__WEBPACK_IMPORTED_MODULE_1__.isValidFunction)(masking.maskHeaders, mask(maskHeadersList)),
|
|
25445
25445
|
};
|
|
@@ -25669,8 +25669,7 @@ const { schemify } = _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_
|
|
|
25669
25669
|
* Checks if the trace should be processed based on trace ID prefixes
|
|
25670
25670
|
*/
|
|
25671
25671
|
function shouldProcessTrace(traceId) {
|
|
25672
|
-
return (traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.
|
|
25673
|
-
traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_DEBUG_PREFIX) ||
|
|
25672
|
+
return (traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_DEBUG_PREFIX) ||
|
|
25674
25673
|
traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_CONTINUOUS_DEBUG_PREFIX));
|
|
25675
25674
|
}
|
|
25676
25675
|
/**
|
|
@@ -25678,7 +25677,7 @@ function shouldProcessTrace(traceId) {
|
|
|
25678
25677
|
*/
|
|
25679
25678
|
function processBody(payload, config, span) {
|
|
25680
25679
|
var _a, _b;
|
|
25681
|
-
const { captureBody, masking
|
|
25680
|
+
const { captureBody, masking } = config;
|
|
25682
25681
|
const traceId = span.spanContext().traceId;
|
|
25683
25682
|
if (!captureBody) {
|
|
25684
25683
|
return {};
|
|
@@ -25690,17 +25689,10 @@ function processBody(payload, config, span) {
|
|
|
25690
25689
|
if (responseBody !== undefined && responseBody !== null) {
|
|
25691
25690
|
responseBody = JSON.parse(JSON.stringify(responseBody));
|
|
25692
25691
|
}
|
|
25693
|
-
// Apply schemify for document traces
|
|
25694
|
-
if (traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_DOC_PREFIX)) {
|
|
25695
|
-
if (schemifyDocSpanPayload) {
|
|
25696
|
-
requestBody = requestBody && schemify(requestBody);
|
|
25697
|
-
responseBody = responseBody && schemify(responseBody);
|
|
25698
|
-
}
|
|
25699
|
-
}
|
|
25700
25692
|
// Apply masking for debug traces
|
|
25701
25693
|
if (traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_DEBUG_PREFIX) ||
|
|
25702
25694
|
traceId.startsWith(_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_0__.MULTIPLAYER_TRACE_CONTINUOUS_DEBUG_PREFIX)) {
|
|
25703
|
-
if (masking.
|
|
25695
|
+
if (masking.isContentMaskingEnabled) {
|
|
25704
25696
|
requestBody = requestBody && ((_a = masking.maskBody) === null || _a === void 0 ? void 0 : _a.call(masking, requestBody, span));
|
|
25705
25697
|
responseBody = responseBody && ((_b = masking.maskBody) === null || _b === void 0 ? void 0 : _b.call(masking, responseBody, span));
|
|
25706
25698
|
}
|