@multiplayer-app/session-recorder-browser 1.2.35 → 1.2.36
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 -7
- package/dist/browser/index.js.map +1 -1
- package/dist/exporters/index.js +1 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +16 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/otel/helpers.d.ts +1 -0
- package/dist/otel/helpers.d.ts.map +1 -1
- package/dist/otel/helpers.js +10 -0
- package/dist/otel/helpers.js.map +1 -1
- package/dist/otel/index.d.ts +0 -1
- package/dist/otel/index.d.ts.map +1 -1
- package/dist/otel/index.js +5 -7
- package/dist/otel/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.umd.js
CHANGED
|
@@ -24317,7 +24317,7 @@ const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000;
|
|
|
24317
24317
|
const SESSION_RESPONSE = 'multiplayer-debug-session-response';
|
|
24318
24318
|
const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
24319
24319
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
24320
|
-
const PACKAGE_VERSION_EXPORT = "1.2.
|
|
24320
|
+
const PACKAGE_VERSION_EXPORT = "1.2.36" || 0;
|
|
24321
24321
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
24322
24322
|
const OTEL_IGNORE_URLS = [
|
|
24323
24323
|
// Traces endpoint
|
|
@@ -24947,6 +24947,7 @@ class NavigationRecorder {
|
|
|
24947
24947
|
"use strict";
|
|
24948
24948
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24949
24949
|
/* harmony export */ extractResponseBody: () => (/* binding */ extractResponseBody),
|
|
24950
|
+
/* harmony export */ getElementTextContent: () => (/* binding */ getElementTextContent),
|
|
24950
24951
|
/* harmony export */ getExporterEndpoint: () => (/* binding */ getExporterEndpoint),
|
|
24951
24952
|
/* harmony export */ headersToObject: () => (/* binding */ headersToObject),
|
|
24952
24953
|
/* harmony export */ processHttpPayload: () => (/* binding */ processHttpPayload)
|
|
@@ -25153,6 +25154,16 @@ const getExporterEndpoint = (exporterEndpoint) => {
|
|
|
25153
25154
|
const trimmedExporterEndpoint = new URL(exporterEndpoint).origin;
|
|
25154
25155
|
return `${trimmedExporterEndpoint}/v1/traces`;
|
|
25155
25156
|
};
|
|
25157
|
+
const getElementTextContent = (element) => {
|
|
25158
|
+
const getInnerText = (element) => {
|
|
25159
|
+
const slicedText = element.innerText.slice(0, 50);
|
|
25160
|
+
if (slicedText.length < element.innerText.length) {
|
|
25161
|
+
return `${slicedText}...`;
|
|
25162
|
+
}
|
|
25163
|
+
return slicedText;
|
|
25164
|
+
};
|
|
25165
|
+
return String(element.textContent || element.ariaLabel || getInnerText(element) || '').trim();
|
|
25166
|
+
};
|
|
25156
25167
|
|
|
25157
25168
|
|
|
25158
25169
|
/***/ }),
|
|
@@ -25194,7 +25205,6 @@ const getExporterEndpoint = (exporterEndpoint) => {
|
|
|
25194
25205
|
|
|
25195
25206
|
class TracerBrowserSDK {
|
|
25196
25207
|
constructor() {
|
|
25197
|
-
this.allowedElements = new Set(['A', 'BUTTON']);
|
|
25198
25208
|
this.sessionId = '';
|
|
25199
25209
|
this.globalErrorListenersRegistered = false;
|
|
25200
25210
|
}
|
|
@@ -25324,11 +25334,10 @@ class TracerBrowserSDK {
|
|
|
25324
25334
|
if (span['parentSpanContext']) {
|
|
25325
25335
|
return true;
|
|
25326
25336
|
}
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
}
|
|
25331
|
-
span.setAttribute('target.innerText', textContent);
|
|
25337
|
+
span.setAttribute('target.innerText', (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getElementTextContent)(element));
|
|
25338
|
+
Array.from(element.attributes).forEach(attribute => {
|
|
25339
|
+
span.setAttribute(`target.attribute.${attribute.name}`, attribute.value);
|
|
25340
|
+
});
|
|
25332
25341
|
return false;
|
|
25333
25342
|
},
|
|
25334
25343
|
},
|