@multiplayer-app/session-recorder-browser 1.2.35 → 1.2.37

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.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.35" || 0;
24320
+ const PACKAGE_VERSION_EXPORT = "1.2.37" || 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,9 @@ const getExporterEndpoint = (exporterEndpoint) => {
25153
25154
  const trimmedExporterEndpoint = new URL(exporterEndpoint).origin;
25154
25155
  return `${trimmedExporterEndpoint}/v1/traces`;
25155
25156
  };
25157
+ const getElementTextContent = (element) => {
25158
+ return String(element.textContent || element.ariaLabel || '').trim();
25159
+ };
25156
25160
 
25157
25161
 
25158
25162
  /***/ }),
@@ -25194,7 +25198,6 @@ const getExporterEndpoint = (exporterEndpoint) => {
25194
25198
 
25195
25199
  class TracerBrowserSDK {
25196
25200
  constructor() {
25197
- this.allowedElements = new Set(['A', 'BUTTON']);
25198
25201
  this.sessionId = '';
25199
25202
  this.globalErrorListenersRegistered = false;
25200
25203
  }
@@ -25324,11 +25327,10 @@ class TracerBrowserSDK {
25324
25327
  if (span['parentSpanContext']) {
25325
25328
  return true;
25326
25329
  }
25327
- let textContent = '';
25328
- if (this.allowedElements.has(element.tagName)) {
25329
- textContent = String(element.textContent || element.ariaLabel || '').trim();
25330
- }
25331
- span.setAttribute('target.innerText', textContent);
25330
+ span.setAttribute('target.innerText', (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getElementTextContent)(element));
25331
+ Array.from(element.attributes).forEach(attribute => {
25332
+ span.setAttribute(`target.attribute.${attribute.name}`, attribute.value);
25333
+ });
25332
25334
  return false;
25333
25335
  },
25334
25336
  },