@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.
@@ -9978,7 +9978,7 @@ const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000;
9978
9978
  const SESSION_RESPONSE = 'multiplayer-debug-session-response';
9979
9979
  const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
9980
9980
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
9981
- const PACKAGE_VERSION_EXPORT = "1.2.35" || 0;
9981
+ const PACKAGE_VERSION_EXPORT = "1.2.37" || 0;
9982
9982
  // Regex patterns for OpenTelemetry ignore URLs
9983
9983
  const OTEL_IGNORE_URLS = [
9984
9984
  // Traces endpoint
package/dist/index.js CHANGED
@@ -24143,7 +24143,7 @@ const DEFAULT_MAX_HTTP_CAPTURING_PAYLOAD_SIZE = 100000;
24143
24143
  const SESSION_RESPONSE = 'multiplayer-debug-session-response';
24144
24144
  const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
24145
24145
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
24146
- const PACKAGE_VERSION_EXPORT = "1.2.35" || 0;
24146
+ const PACKAGE_VERSION_EXPORT = "1.2.37" || 0;
24147
24147
  // Regex patterns for OpenTelemetry ignore URLs
24148
24148
  const OTEL_IGNORE_URLS = [
24149
24149
  // Traces endpoint
@@ -24762,6 +24762,7 @@ class NavigationRecorder {
24762
24762
 
24763
24763
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24764
24764
  /* harmony export */ extractResponseBody: () => (/* binding */ extractResponseBody),
24765
+ /* harmony export */ getElementTextContent: () => (/* binding */ getElementTextContent),
24765
24766
  /* harmony export */ getExporterEndpoint: () => (/* binding */ getExporterEndpoint),
24766
24767
  /* harmony export */ headersToObject: () => (/* binding */ headersToObject),
24767
24768
  /* harmony export */ processHttpPayload: () => (/* binding */ processHttpPayload)
@@ -24968,6 +24969,9 @@ const getExporterEndpoint = (exporterEndpoint) => {
24968
24969
  const trimmedExporterEndpoint = new URL(exporterEndpoint).origin;
24969
24970
  return `${trimmedExporterEndpoint}/v1/traces`;
24970
24971
  };
24972
+ const getElementTextContent = (element) => {
24973
+ return String(element.textContent || element.ariaLabel || '').trim();
24974
+ };
24971
24975
 
24972
24976
 
24973
24977
  /***/ }),
@@ -25008,7 +25012,6 @@ const getExporterEndpoint = (exporterEndpoint) => {
25008
25012
 
25009
25013
  class TracerBrowserSDK {
25010
25014
  constructor() {
25011
- this.allowedElements = new Set(['A', 'BUTTON']);
25012
25015
  this.sessionId = '';
25013
25016
  this.globalErrorListenersRegistered = false;
25014
25017
  }
@@ -25138,11 +25141,10 @@ class TracerBrowserSDK {
25138
25141
  if (span['parentSpanContext']) {
25139
25142
  return true;
25140
25143
  }
25141
- let textContent = '';
25142
- if (this.allowedElements.has(element.tagName)) {
25143
- textContent = String(element.textContent || element.ariaLabel || '').trim();
25144
- }
25145
- span.setAttribute('target.innerText', textContent);
25144
+ span.setAttribute('target.innerText', (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getElementTextContent)(element));
25145
+ Array.from(element.attributes).forEach(attribute => {
25146
+ span.setAttribute(`target.attribute.${attribute.name}`, attribute.value);
25147
+ });
25146
25148
  return false;
25147
25149
  },
25148
25150
  },