@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.
- package/dist/browser/index.js +15 -18
- package/dist/exporters/index.js +1 -1
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +15 -18
- package/dist/index.umd.js.map +1 -1
- package/dist/otel/index.d.ts +1 -0
- package/dist/otel/index.d.ts.map +1 -1
- package/dist/otel/index.js +14 -17
- package/dist/otel/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24149,7 +24149,7 @@ const CONTINUOUS_DEBUGGING_TIMEOUT = 60000; // 1 minutes
|
|
|
24149
24149
|
const DEBUG_SESSION_MAX_DURATION_SECONDS = 10 * 60 + 30; // TODO: move to shared config otel core
|
|
24150
24150
|
const REMOTE_SESSION_RECORDING_START = 'remote-session-recording:start';
|
|
24151
24151
|
const REMOTE_SESSION_RECORDING_STOP = 'remote-session-recording:stop';
|
|
24152
|
-
const PACKAGE_VERSION_EXPORT = "1.3.
|
|
24152
|
+
const PACKAGE_VERSION_EXPORT = "1.3.14" || 0;
|
|
24153
24153
|
// Regex patterns for OpenTelemetry ignore URLs
|
|
24154
24154
|
const OTEL_IGNORE_URLS = [
|
|
24155
24155
|
// Traces endpoint
|
|
@@ -25046,7 +25046,6 @@ const getElementTextContent = (element) => {
|
|
|
25046
25046
|
|
|
25047
25047
|
|
|
25048
25048
|
|
|
25049
|
-
|
|
25050
25049
|
class TracerBrowserSDK {
|
|
25051
25050
|
constructor() {
|
|
25052
25051
|
this.sessionId = '';
|
|
@@ -25221,14 +25220,7 @@ class TracerBrowserSDK {
|
|
|
25221
25220
|
try {
|
|
25222
25221
|
const activeSpan = _opentelemetry_api__WEBPACK_IMPORTED_MODULE_10__.trace.getSpan(_opentelemetry_api__WEBPACK_IMPORTED_MODULE_11__.context.active());
|
|
25223
25222
|
if (activeSpan) {
|
|
25224
|
-
|
|
25225
|
-
_multiplayer_app_session_recorder_common__WEBPACK_IMPORTED_MODULE_1__.SessionRecorderSdk.captureException(error);
|
|
25226
|
-
activeSpan.addEvent('exception', {
|
|
25227
|
-
'exception.type': error.name || 'Error',
|
|
25228
|
-
'exception.message': error.message,
|
|
25229
|
-
'exception.stacktrace': error.stack || '',
|
|
25230
|
-
...(errorInfo || {}),
|
|
25231
|
-
});
|
|
25223
|
+
this._recordException(activeSpan, error, errorInfo);
|
|
25232
25224
|
return;
|
|
25233
25225
|
}
|
|
25234
25226
|
// eslint-disable-next-line
|
|
@@ -25238,19 +25230,24 @@ class TracerBrowserSDK {
|
|
|
25238
25230
|
try {
|
|
25239
25231
|
const tracer = _opentelemetry_api__WEBPACK_IMPORTED_MODULE_10__.trace.getTracer('exception');
|
|
25240
25232
|
const span = tracer.startSpan(error.name || 'Error');
|
|
25241
|
-
|
|
25242
|
-
span.setStatus({ code: _opentelemetry_api__WEBPACK_IMPORTED_MODULE_12__.SpanStatusCode.ERROR, message: error.message });
|
|
25243
|
-
span.addEvent('exception', {
|
|
25244
|
-
'exception.type': error.name || 'Error',
|
|
25245
|
-
'exception.message': error.message,
|
|
25246
|
-
'exception.stacktrace': error.stack || '',
|
|
25247
|
-
...(errorInfo || {}),
|
|
25248
|
-
});
|
|
25233
|
+
this._recordException(span, error, errorInfo);
|
|
25249
25234
|
span.end();
|
|
25250
25235
|
// eslint-disable-next-line
|
|
25251
25236
|
}
|
|
25252
25237
|
catch (_ignored) { }
|
|
25253
25238
|
}
|
|
25239
|
+
_recordException(span, error, errorInfo) {
|
|
25240
|
+
span.recordException(error);
|
|
25241
|
+
span.setStatus({ code: _opentelemetry_api__WEBPACK_IMPORTED_MODULE_12__.SpanStatusCode.ERROR, message: error.message });
|
|
25242
|
+
span.setAttribute('exception.type', error.name || 'Error');
|
|
25243
|
+
span.setAttribute('exception.message', error.message);
|
|
25244
|
+
span.setAttribute('exception.stacktrace', error.stack || '');
|
|
25245
|
+
if (errorInfo) {
|
|
25246
|
+
Object.entries(errorInfo).forEach(([key, value]) => {
|
|
25247
|
+
span.setAttribute(`error_info.${key}`, value);
|
|
25248
|
+
});
|
|
25249
|
+
}
|
|
25250
|
+
}
|
|
25254
25251
|
_getSpanSessionIdProcessor() {
|
|
25255
25252
|
return {
|
|
25256
25253
|
forceFlush: () => Promise.resolve(),
|