@multiplayer-app/session-recorder-browser 1.3.13 → 1.3.14

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.
@@ -25051,7 +25051,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
25051
25051
  const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
25052
25052
  const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
25053
25053
  const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
25054
- const PACKAGE_VERSION_EXPORT = "1.3.13" || 0;
25054
+ const PACKAGE_VERSION_EXPORT = "1.3.14" || 0;
25055
25055
  // Regex patterns for OpenTelemetry ignore URLs
25056
25056
  const OTEL_IGNORE_URLS = [
25057
25057
  // Traces endpoint
@@ -25989,7 +25989,6 @@ __webpack_require__.r(__webpack_exports__);
25989
25989
 
25990
25990
 
25991
25991
 
25992
-
25993
25992
  class TracerBrowserSDK {
25994
25993
  constructor() {
25995
25994
  this.sessionId = '';
@@ -26164,14 +26163,7 @@ class TracerBrowserSDK {
26164
26163
  try {
26165
26164
  const activeSpan = _opentelemetry_api__WEBPACK_IMPORTED_MODULE_10__.trace.getSpan(_opentelemetry_api__WEBPACK_IMPORTED_MODULE_11__.context.active());
26166
26165
  if (activeSpan) {
26167
- // Standard OTEL exception event + span status
26168
- _multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionRecorderSdk.captureException(error);
26169
- activeSpan.addEvent('exception', {
26170
- 'exception.type': error.name || 'Error',
26171
- 'exception.message': error.message,
26172
- 'exception.stacktrace': error.stack || '',
26173
- ...(errorInfo || {}),
26174
- });
26166
+ this._recordException(activeSpan, error, errorInfo);
26175
26167
  return;
26176
26168
  }
26177
26169
  // eslint-disable-next-line
@@ -26181,19 +26173,24 @@ class TracerBrowserSDK {
26181
26173
  try {
26182
26174
  const tracer = _opentelemetry_api__WEBPACK_IMPORTED_MODULE_10__.trace.getTracer('exception');
26183
26175
  const span = tracer.startSpan(error.name || 'Error');
26184
- span.recordException(error);
26185
- span.setStatus({ code: _opentelemetry_api__WEBPACK_IMPORTED_MODULE_12__.SpanStatusCode.ERROR, message: error.message });
26186
- span.addEvent('exception', {
26187
- 'exception.type': error.name || 'Error',
26188
- 'exception.message': error.message,
26189
- 'exception.stacktrace': error.stack || '',
26190
- ...(errorInfo || {}),
26191
- });
26176
+ this._recordException(span, error, errorInfo);
26192
26177
  span.end();
26193
26178
  // eslint-disable-next-line
26194
26179
  }
26195
26180
  catch (_ignored) { }
26196
26181
  }
26182
+ _recordException(span, error, errorInfo) {
26183
+ span.recordException(error);
26184
+ span.setStatus({ code: _opentelemetry_api__WEBPACK_IMPORTED_MODULE_12__.SpanStatusCode.ERROR, message: error.message });
26185
+ span.setAttribute('exception.type', error.name || 'Error');
26186
+ span.setAttribute('exception.message', error.message);
26187
+ span.setAttribute('exception.stacktrace', error.stack || '');
26188
+ if (errorInfo) {
26189
+ Object.entries(errorInfo).forEach(([key, value]) => {
26190
+ span.setAttribute(`error_info.${key}`, value);
26191
+ });
26192
+ }
26193
+ }
26197
26194
  _getSpanSessionIdProcessor() {
26198
26195
  return {
26199
26196
  forceFlush: () => Promise.resolve(),