@coralogix/browser 3.4.1 → 3.5.0
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/CHANGELOG.md +6 -0
- package/README.md +24 -21
- package/index.esm.js +1 -1
- package/index.esm2.js +88 -35
- package/package.json +1 -3
- package/sessionRecorder.esm.js +5535 -1314
- package/src/constants.d.ts +1 -2
- package/src/cx-rrweb/rrweb/index.d.ts +4 -0
- package/src/cx-rrweb/rrweb/record/cross-origin-iframe-mirror.d.ts +14 -0
- package/src/cx-rrweb/rrweb/record/error-handler.d.ts +6 -0
- package/src/cx-rrweb/rrweb/record/iframe-manager.d.ts +34 -0
- package/src/cx-rrweb/rrweb/record/index.d.ts +10 -0
- package/src/cx-rrweb/rrweb/record/mutation.d.ts +50 -0
- package/src/cx-rrweb/rrweb/record/observer.d.ts +9 -0
- package/src/cx-rrweb/rrweb/record/observers/canvas/2d.d.ts +2 -0
- package/src/cx-rrweb/rrweb/record/observers/canvas/canvas-manager.d.ts +37 -0
- package/src/cx-rrweb/rrweb/record/observers/canvas/canvas.d.ts +2 -0
- package/src/cx-rrweb/rrweb/record/observers/canvas/serialize-args.d.ts +6 -0
- package/src/cx-rrweb/rrweb/record/observers/canvas/webgl.d.ts +2 -0
- package/src/cx-rrweb/rrweb/record/processed-node-manager.d.ts +8 -0
- package/src/cx-rrweb/rrweb/record/shadow-dom-manager.d.ts +26 -0
- package/src/cx-rrweb/rrweb/record/stylesheet-manager.d.ts +17 -0
- package/src/cx-rrweb/rrweb/record/workers/image-bitmap-data-url-worker.d.ts +6 -0
- package/src/cx-rrweb/rrweb/types.d.ts +102 -0
- package/src/cx-rrweb/rrweb/utils/base64.d.ts +1 -0
- package/src/cx-rrweb/rrweb/utils.d.ts +66 -0
- package/src/cx-rrweb/rrweb-plugin-console-record/error-stack-parser.d.ts +37 -0
- package/src/cx-rrweb/rrweb-plugin-console-record/index.d.ts +42 -0
- package/src/cx-rrweb/rrweb-plugin-console-record/stringify.d.ts +2 -0
- package/src/cx-rrweb/rrweb-snapshot/index.d.ts +4 -0
- package/src/cx-rrweb/rrweb-snapshot/snapshot.d.ts +76 -0
- package/src/cx-rrweb/rrweb-snapshot/types.d.ts +50 -0
- package/src/cx-rrweb/rrweb-snapshot/utils.d.ts +51 -0
- package/src/cx-rrweb/rrweb-types/index.d.ts +558 -0
- package/src/cx-rrweb/rrweb-utils/index.d.ts +43 -0
- package/src/session/session-idle.d.ts +2 -0
- package/src/session/session.model.d.ts +3 -3
- package/src/session/sessionRecorder.d.ts +0 -3
- package/src/tools/cx-timers.d.ts +25 -0
- package/src/tools/global-keys.d.ts +2 -0
- package/src/types.d.ts +2 -1
- package/src/version.d.ts +1 -1
- package/src/tools/getZoneJsOriginalDom.d.ts +0 -1
- package/src/utils/zone-patch.d.ts +0 -10
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
- [Recording Manually](#recording-manually)
|
|
20
20
|
- [Privacy & Security](#privacy--security)
|
|
21
|
-
- [Performance](#performance)
|
|
22
21
|
- [Worker URL](#worker-url)
|
|
23
22
|
- [Screenshots](#screenshots)
|
|
24
23
|
|
|
@@ -51,7 +50,8 @@
|
|
|
51
50
|
|
|
52
51
|
26. [Soft Navigations (Experimental)](#soft-navigations--experimental)
|
|
53
52
|
27. [Memory Usage (Experimental)](#memory-usage---experimental)
|
|
54
|
-
28. [
|
|
53
|
+
28. [Angular Zone.js Configuration](#angular-zonejs-configuration)
|
|
54
|
+
29. [CDN](#cdn)
|
|
55
55
|
|
|
56
56
|
- [Specific Version](#specific-version-recommended)
|
|
57
57
|
- [Add the CDN Script to Your Application](#add-the-cdn-script-to-your-application)
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
- [Via JS File](#via-js-file)
|
|
60
60
|
- [Via TS File](#via-ts-file)
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
30. [Flutter Web](#flutter-web)
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -352,22 +352,6 @@ CoralogixRum.init({
|
|
|
352
352
|
});
|
|
353
353
|
```
|
|
354
354
|
|
|
355
|
-
#### Performance
|
|
356
|
-
|
|
357
|
-
Session Recording works by recording incremental DOM changes that occur in your web application.
|
|
358
|
-
To avoid performance issues, Session Recording will stop recording if it detects a large number of mutations (Default: 5,000).
|
|
359
|
-
|
|
360
|
-
```javascript
|
|
361
|
-
CoralogixRum.init({
|
|
362
|
-
// ...
|
|
363
|
-
sessionRecordingConfig: {
|
|
364
|
-
// ...
|
|
365
|
-
// According to MutationObserver API, A large number of DOM mutations can negatively impact performance
|
|
366
|
-
maxMutations: 5000,
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
```
|
|
370
|
-
|
|
371
355
|
#### Worker Url
|
|
372
356
|
|
|
373
357
|
By default, Session recording uses an inline web worker script to compress data before transmission. For added flexibility, you can host a custom worker script on your own domain. Simply host the following file on your server: [worker.min.js](https://cdn.rum-ingress-coralogix.com/coralogix/browser/latest/worker.min.js)
|
|
@@ -872,8 +856,7 @@ This feature allows you to track multiple applications on the same page.<br>
|
|
|
872
856
|
|
|
873
857
|
#### Pre Requisites
|
|
874
858
|
|
|
875
|
-
To support microfrontend, you need to install one of these plugins: [webpack](https://www.npmjs.com/package/@coralogix/webpack-plugin), [esbuild](https://www.npmjs.com/package/@coralogix/esbuild-plugin) and include them in your build process
|
|
876
|
-
Plugins for other bundlers are coming soon.
|
|
859
|
+
To support microfrontend, you need to install one of these plugins: [webpack](https://www.npmjs.com/package/@coralogix/webpack-plugin), [esbuild](https://www.npmjs.com/package/@coralogix/esbuild-plugin), [vite](https://www.npmjs.com/package/@coralogix/vite-plugin) and include them in your build process.
|
|
877
860
|
|
|
878
861
|
When an error occurs, the SDK will find the correlated microfrontend and will add a label with the microfrontend app/version to the error event.
|
|
879
862
|
|
|
@@ -1028,6 +1011,26 @@ self.onmessage = (message) => {
|
|
|
1028
1011
|
|
|
1029
1012
|
---
|
|
1030
1013
|
|
|
1014
|
+
## Angular Zone.js Configuration
|
|
1015
|
+
|
|
1016
|
+
By default, the SDK runs its internal timers outside Angular's Zone.js to prevent unnecessary change detection cycles. This improves performance by avoiding redundant UI updates triggered by the SDK's background operations.
|
|
1017
|
+
|
|
1018
|
+
```javascript
|
|
1019
|
+
CoralogixRum.init({
|
|
1020
|
+
// ...
|
|
1021
|
+
runOutsideAngularZone: true, // Defaults to true
|
|
1022
|
+
});
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
| Value | Behavior |
|
|
1026
|
+
| ------- | ------------------------------------------------------------------------ |
|
|
1027
|
+
| `true` | SDK timers run outside Zone.js, preventing change detection triggers. |
|
|
1028
|
+
| `false` | SDK timers run inside Zone.js, which may trigger change detection. |
|
|
1029
|
+
|
|
1030
|
+
> **Note:** In most cases, you should keep the default value (`true`) for optimal performance. Only set to `false` if you have a specific reason to include SDK operations in Angular's change detection.
|
|
1031
|
+
|
|
1032
|
+
---
|
|
1033
|
+
|
|
1031
1034
|
## CDN
|
|
1032
1035
|
|
|
1033
1036
|
Coralogix Browser SDK is also provided via CDN.<br>
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { s as CoralogixEventType, q as CoralogixLogSeverity, p as CoralogixRum, O as OtelNetworkAttrs, P as PerformanceTypes, r as SessionRecordingEventType, U as UrlBasedLabelProvider, t as UrlType } from './index.esm2.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import '@opentelemetry/sdk-trace-base';
|
|
4
4
|
import '@opentelemetry/sdk-trace-web';
|
package/index.esm2.js
CHANGED
|
@@ -195,6 +195,9 @@ var CoralogixLogSeverity;
|
|
|
195
195
|
CoralogixLogSeverity[CoralogixLogSeverity["Critical"] = 6] = "Critical";
|
|
196
196
|
})(CoralogixLogSeverity || (CoralogixLogSeverity = {}));
|
|
197
197
|
|
|
198
|
+
var SDK_CONFIG_KEY = 'sdkConfig';
|
|
199
|
+
var USER_AGENT_KEY = 'userAgent';
|
|
200
|
+
|
|
198
201
|
var millisecondsPerSecond = 1000;
|
|
199
202
|
var millisecondsPerMinute = millisecondsPerSecond * 60;
|
|
200
203
|
var MILLISECONDS_PER_HOUR = millisecondsPerMinute * 60;
|
|
@@ -212,7 +215,6 @@ var BATCH_TIME_DELAY = 1000;
|
|
|
212
215
|
var SESSION_RECORDING_POSTFIX_URL = '/browser/alpha/sessionrecording';
|
|
213
216
|
var SESSION_KEY = 'rum_session';
|
|
214
217
|
var PREV_SESSION_KEY = 'rum_prev_session';
|
|
215
|
-
var MUTATION_LIMIT = 10000;
|
|
216
218
|
var DEFAULT_SESSION_CONFIG = {
|
|
217
219
|
sessionSampleRate: 100,
|
|
218
220
|
onlyWithErrorConfig: {
|
|
@@ -1303,6 +1305,64 @@ var IMG_EXTENSIONS = [
|
|
|
1303
1305
|
'.webp',
|
|
1304
1306
|
];
|
|
1305
1307
|
|
|
1308
|
+
function getBrowserWindow() {
|
|
1309
|
+
return CxGlobal;
|
|
1310
|
+
}
|
|
1311
|
+
function shouldRunOutsideZone() {
|
|
1312
|
+
var _a;
|
|
1313
|
+
return ((_a = getSdkConfig()) === null || _a === void 0 ? void 0 : _a.runOutsideAngularZone) !== false;
|
|
1314
|
+
}
|
|
1315
|
+
function getZoneJsOriginalDom(target, name) {
|
|
1316
|
+
if (!shouldRunOutsideZone()) {
|
|
1317
|
+
return target[name];
|
|
1318
|
+
}
|
|
1319
|
+
var browserWindow = getBrowserWindow();
|
|
1320
|
+
var original;
|
|
1321
|
+
if (browserWindow.Zone &&
|
|
1322
|
+
typeof browserWindow.Zone.__symbol__ === 'function') {
|
|
1323
|
+
original = target[browserWindow.Zone.__symbol__(name)];
|
|
1324
|
+
}
|
|
1325
|
+
if (!original) {
|
|
1326
|
+
original = target[name];
|
|
1327
|
+
}
|
|
1328
|
+
return original;
|
|
1329
|
+
}
|
|
1330
|
+
function cxSetTimeout(callback, delay) {
|
|
1331
|
+
var browserWindow = getBrowserWindow();
|
|
1332
|
+
var originalSetTimeout = getZoneJsOriginalDom(browserWindow, 'setTimeout');
|
|
1333
|
+
return originalSetTimeout.call(browserWindow, callback, delay);
|
|
1334
|
+
}
|
|
1335
|
+
function cxSetInterval(callback, delay) {
|
|
1336
|
+
var browserWindow = getBrowserWindow();
|
|
1337
|
+
var originalSetInterval = getZoneJsOriginalDom(browserWindow, 'setInterval');
|
|
1338
|
+
return originalSetInterval.call(browserWindow, callback, delay);
|
|
1339
|
+
}
|
|
1340
|
+
function cxClearTimeout(id) {
|
|
1341
|
+
var browserWindow = getBrowserWindow();
|
|
1342
|
+
var originalClearTimeout = getZoneJsOriginalDom(browserWindow, 'clearTimeout');
|
|
1343
|
+
originalClearTimeout.call(browserWindow, id);
|
|
1344
|
+
}
|
|
1345
|
+
function cxClearInterval(id) {
|
|
1346
|
+
var browserWindow = getBrowserWindow();
|
|
1347
|
+
var originalClearInterval = getZoneJsOriginalDom(browserWindow, 'clearInterval');
|
|
1348
|
+
originalClearInterval.call(browserWindow, id);
|
|
1349
|
+
}
|
|
1350
|
+
function cxRequestAnimationFrame(callback) {
|
|
1351
|
+
var browserWindow = getBrowserWindow();
|
|
1352
|
+
var originalRaf = getZoneJsOriginalDom(browserWindow, 'requestAnimationFrame');
|
|
1353
|
+
return originalRaf.call(browserWindow, callback);
|
|
1354
|
+
}
|
|
1355
|
+
function cxCancelAnimationFrame(id) {
|
|
1356
|
+
var browserWindow = getBrowserWindow();
|
|
1357
|
+
var originalCaf = getZoneJsOriginalDom(browserWindow, 'cancelAnimationFrame');
|
|
1358
|
+
originalCaf.call(browserWindow, id);
|
|
1359
|
+
}
|
|
1360
|
+
function createCxMutationObserver(callback) {
|
|
1361
|
+
var browserWindow = getBrowserWindow();
|
|
1362
|
+
var OriginalMutationObserver = getZoneJsOriginalDom(browserWindow, 'MutationObserver');
|
|
1363
|
+
return new OriginalMutationObserver(callback);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1306
1366
|
/** Original source: https://www.npmjs.com/package/tti-polyfill?activeTab=code
|
|
1307
1367
|
* @license Apache-2.0
|
|
1308
1368
|
* @version 0.2.2
|
|
@@ -1409,7 +1469,7 @@ function z(a, b) {
|
|
|
1409
1469
|
return false;
|
|
1410
1470
|
}
|
|
1411
1471
|
function A(a) {
|
|
1412
|
-
var b =
|
|
1472
|
+
var b = createCxMutationObserver(function (c) {
|
|
1413
1473
|
c = t(c);
|
|
1414
1474
|
for (var b = c.next(); !b.done; b = c.next()) b = b.value, 'childList' == b.type && z(b.addedNodes, y) ? a(b) : 'attributes' == b.type && y.includes(b.target.tagName.toLowerCase()) && a(b);
|
|
1415
1475
|
});
|
|
@@ -1494,7 +1554,7 @@ function F(a) {
|
|
|
1494
1554
|
G(a, Math.max(c + 5e3, b));
|
|
1495
1555
|
}
|
|
1496
1556
|
function G(a, b) {
|
|
1497
|
-
!a.i || a.v > b || (
|
|
1557
|
+
!a.i || a.v > b || (cxClearTimeout(a.j), a.j = cxSetTimeout(function () {
|
|
1498
1558
|
var b = performance.timing.navigationStart,
|
|
1499
1559
|
d = B(a.g, a.b),
|
|
1500
1560
|
b = (CxGlobal.a && CxGlobal.a.A ? 1e3 * CxGlobal.a.A().C - b : 0) || performance.timing.domContentLoadedEventEnd - b;
|
|
@@ -1503,7 +1563,7 @@ function G(a, b) {
|
|
|
1503
1563
|
null === f && G(a, Math.max(d + 5e3, e + 1e3));
|
|
1504
1564
|
var g = a.a;
|
|
1505
1565
|
5e3 > e - d ? d = null : (d = g.length ? g[g.length - 1].end : b, d = 5e3 > e - d ? null : Math.max(d, f));
|
|
1506
|
-
d && (a.s(d),
|
|
1566
|
+
d && (a.s(d), cxClearTimeout(a.j), a.i = false, a.c && a.c.disconnect(), a.h && a.h.disconnect());
|
|
1507
1567
|
G(a, performance.now() + 1e3);
|
|
1508
1568
|
}, b - performance.now()), a.v = b);
|
|
1509
1569
|
}
|
|
@@ -1909,19 +1969,6 @@ var CoralogixResourcesInstrumentation = (function (_super) {
|
|
|
1909
1969
|
return CoralogixResourcesInstrumentation;
|
|
1910
1970
|
}(InstrumentationBase));
|
|
1911
1971
|
|
|
1912
|
-
function getZoneJsOriginalDom(target, name) {
|
|
1913
|
-
var browserWindow = getCxGlobal();
|
|
1914
|
-
var original;
|
|
1915
|
-
if (browserWindow.Zone &&
|
|
1916
|
-
typeof browserWindow.Zone.__symbol__ === 'function') {
|
|
1917
|
-
original = target[browserWindow.Zone.__symbol__(name)];
|
|
1918
|
-
}
|
|
1919
|
-
if (!original) {
|
|
1920
|
-
original = target[name];
|
|
1921
|
-
}
|
|
1922
|
-
return original;
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
1972
|
function addEventListeners(eventTarget, eventNames, listener, _a) {
|
|
1926
1973
|
var _b = _a === void 0 ? {} : _a, once = _b.once, capture = _b.capture, passive = _b.passive;
|
|
1927
1974
|
var resolvedListener = once
|
|
@@ -2199,7 +2246,7 @@ var CoralogixMemoryUsageInstrumentation = (function (_super) {
|
|
|
2199
2246
|
};
|
|
2200
2247
|
CoralogixMemoryUsageInstrumentation.prototype.runMemoryMeasurements = function () {
|
|
2201
2248
|
var _this = this;
|
|
2202
|
-
this.timeoutId =
|
|
2249
|
+
this.timeoutId = cxSetTimeout(function () { return _this.measureMemoryUsage(); }, this.memoryUsageInterval);
|
|
2203
2250
|
};
|
|
2204
2251
|
CoralogixMemoryUsageInstrumentation.prototype.measureMemoryUsage = function () {
|
|
2205
2252
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2216,7 +2263,7 @@ var CoralogixMemoryUsageInstrumentation = (function (_super) {
|
|
|
2216
2263
|
};
|
|
2217
2264
|
CoralogixMemoryUsageInstrumentation.prototype.clearMeasurementsInterval = function () {
|
|
2218
2265
|
if (this.timeoutId) {
|
|
2219
|
-
|
|
2266
|
+
cxClearTimeout(this.timeoutId);
|
|
2220
2267
|
}
|
|
2221
2268
|
};
|
|
2222
2269
|
return CoralogixMemoryUsageInstrumentation;
|
|
@@ -2373,10 +2420,12 @@ var CoralogixDOMInstrumentation = (function (_super) {
|
|
|
2373
2420
|
return _this;
|
|
2374
2421
|
}
|
|
2375
2422
|
CoralogixDOMInstrumentation.prototype.registerToDOMEvents = function () {
|
|
2376
|
-
document
|
|
2423
|
+
var originalAddEventListener = getZoneJsOriginalDom(document, 'addEventListener');
|
|
2424
|
+
originalAddEventListener.call(document, 'visibilitychange', this.visibilityChangeHandler);
|
|
2377
2425
|
};
|
|
2378
2426
|
CoralogixDOMInstrumentation.prototype.unregisterFromDOMEvents = function () {
|
|
2379
|
-
document
|
|
2427
|
+
var originalRemoveEventListener = getZoneJsOriginalDom(document, 'removeEventListener');
|
|
2428
|
+
originalRemoveEventListener.call(document, 'visibilitychange', this.visibilityChangeHandler);
|
|
2380
2429
|
};
|
|
2381
2430
|
CoralogixDOMInstrumentation.prototype.init = function () { };
|
|
2382
2431
|
CoralogixDOMInstrumentation.prototype.disable = function () {
|
|
@@ -2384,7 +2433,7 @@ var CoralogixDOMInstrumentation = (function (_super) {
|
|
|
2384
2433
|
};
|
|
2385
2434
|
CoralogixDOMInstrumentation.prototype.enable = function () {
|
|
2386
2435
|
var _this = this;
|
|
2387
|
-
|
|
2436
|
+
cxSetTimeout(function () {
|
|
2388
2437
|
_this.registerToDOMEvents();
|
|
2389
2438
|
});
|
|
2390
2439
|
};
|
|
@@ -2470,8 +2519,6 @@ var REQUIRED_CONFIG_KEYS = [
|
|
|
2470
2519
|
'version',
|
|
2471
2520
|
'coralogixDomain',
|
|
2472
2521
|
];
|
|
2473
|
-
var SDK_CONFIG_KEY = 'sdkConfig';
|
|
2474
|
-
var USER_AGENT_KEY = 'userAgent';
|
|
2475
2522
|
var ID_MASK_KEY = '{id}';
|
|
2476
2523
|
var UUID_REGEX = /[0-9a-fA-F-]{36}/g;
|
|
2477
2524
|
var NANOID_REGEX = /^[a-zA-Z0-9-_]{21}$/;
|
|
@@ -3630,7 +3677,7 @@ var CoralogixExporter = (function () {
|
|
|
3630
3677
|
chunks.push(cachedLogs.slice(i, i + MAX_RUM_EVENTS_PER_REQUEST));
|
|
3631
3678
|
}
|
|
3632
3679
|
chunks.forEach(function (chunk) {
|
|
3633
|
-
|
|
3680
|
+
cxSetTimeout(function () { return _this.invokeLogRequest(chunk, true); }, _this.batchTimeDelay);
|
|
3634
3681
|
_this.batchTimeDelay += BATCH_TIME_DELAY;
|
|
3635
3682
|
});
|
|
3636
3683
|
this.clearCachedDataForSessionWithError();
|
|
@@ -3673,22 +3720,28 @@ var SessionIdle = (function () {
|
|
|
3673
3720
|
var _this = this;
|
|
3674
3721
|
this.idleConfig = idleConfig;
|
|
3675
3722
|
this._isIdleActive = false;
|
|
3723
|
+
this.lastResetTime = 0;
|
|
3724
|
+
this.THROTTLE_MS = 1000;
|
|
3676
3725
|
this.stopCallbacks = {};
|
|
3677
3726
|
this.resetTimeout = function () {
|
|
3678
3727
|
var _a, _b;
|
|
3679
3728
|
(_b = (_a = _this.stopCallbacks).clearTimeout) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
3680
|
-
var id =
|
|
3729
|
+
var id = cxSetTimeout(function () {
|
|
3681
3730
|
_this._isIdleActive = true;
|
|
3682
3731
|
_this.idleConfig.onIdle();
|
|
3683
3732
|
}, _this.idleConfig.timeoutDelay);
|
|
3684
|
-
_this.stopCallbacks.clearTimeout = function () { return
|
|
3733
|
+
_this.stopCallbacks.clearTimeout = function () { return cxClearTimeout(id); };
|
|
3685
3734
|
};
|
|
3686
3735
|
this.idlenessEventsHandler = function () {
|
|
3687
3736
|
if (_this._isIdleActive) {
|
|
3688
3737
|
_this._isIdleActive = false;
|
|
3689
3738
|
_this.idleConfig.onActive();
|
|
3690
3739
|
}
|
|
3691
|
-
|
|
3740
|
+
var now = Date.now();
|
|
3741
|
+
if (now - _this.lastResetTime >= _this.THROTTLE_MS) {
|
|
3742
|
+
_this.lastResetTime = now;
|
|
3743
|
+
_this.resetTimeout();
|
|
3744
|
+
}
|
|
3692
3745
|
};
|
|
3693
3746
|
}
|
|
3694
3747
|
Object.defineProperty(SessionIdle.prototype, "isIdleActive", {
|
|
@@ -4110,7 +4163,7 @@ function isInitialConfigValid(initConfig) {
|
|
|
4110
4163
|
return true;
|
|
4111
4164
|
}
|
|
4112
4165
|
function validateAndResolveInitConfig(config) {
|
|
4113
|
-
var _a, _b, _c;
|
|
4166
|
+
var _a, _b, _c, _d;
|
|
4114
4167
|
if (!isInitialConfigValid(config)) {
|
|
4115
4168
|
return;
|
|
4116
4169
|
}
|
|
@@ -4120,7 +4173,7 @@ function validateAndResolveInitConfig(config) {
|
|
|
4120
4173
|
if (proxyUrl)
|
|
4121
4174
|
resolvedIgnoreUrls.push(new RegExp(proxyUrl));
|
|
4122
4175
|
OPTIONS_DEFAULTS.ignoreUrls && resolvedIgnoreUrls.push.apply(resolvedIgnoreUrls, __spreadArray([], __read$1(OPTIONS_DEFAULTS.ignoreUrls), false));
|
|
4123
|
-
return __assign(__assign(__assign({}, OPTIONS_DEFAULTS), config), { maskInputTypes: (_a = config.maskInputTypes) !== null && _a !== void 0 ? _a : MASK_INPUT_TYPES_DEFAULT, maskClass: (_b = config.maskClass) !== null && _b !== void 0 ? _b : MASK_CLASS_DEFAULT, ignoreUrls: resolvedIgnoreUrls, urlBlueprinters: resolveUrlBlueprinters(urlBlueprinters), sessionSampleRate: (_c = config.sessionSampleRate) !== null && _c !== void 0 ? _c : 100, sessionConfig: resolveSessionConfig(config.sessionConfig), sessionRecordingConfig: resolveSessionRecordingConfig(config.sessionRecordingConfig), memoryUsageConfig: resolveMemoryUsageConfig(config.memoryUsageConfig), trackSoftNavigations: !!config.trackSoftNavigations, supportMfe: !!config.supportMfe });
|
|
4176
|
+
return __assign(__assign(__assign({}, OPTIONS_DEFAULTS), config), { maskInputTypes: (_a = config.maskInputTypes) !== null && _a !== void 0 ? _a : MASK_INPUT_TYPES_DEFAULT, maskClass: (_b = config.maskClass) !== null && _b !== void 0 ? _b : MASK_CLASS_DEFAULT, ignoreUrls: resolvedIgnoreUrls, urlBlueprinters: resolveUrlBlueprinters(urlBlueprinters), sessionSampleRate: (_c = config.sessionSampleRate) !== null && _c !== void 0 ? _c : 100, sessionConfig: resolveSessionConfig(config.sessionConfig), sessionRecordingConfig: resolveSessionRecordingConfig(config.sessionRecordingConfig), memoryUsageConfig: resolveMemoryUsageConfig(config.memoryUsageConfig), trackSoftNavigations: !!config.trackSoftNavigations, supportMfe: !!config.supportMfe, runOutsideAngularZone: (_d = config.runOutsideAngularZone) !== null && _d !== void 0 ? _d : true });
|
|
4124
4177
|
}
|
|
4125
4178
|
function resolveMemoryUsageConfig(memoryUsageConfig) {
|
|
4126
4179
|
var _a;
|
|
@@ -4154,7 +4207,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
|
|
|
4154
4207
|
return resolvedUrlBlueprinters;
|
|
4155
4208
|
}
|
|
4156
4209
|
|
|
4157
|
-
var SDK_VERSION = '3.
|
|
4210
|
+
var SDK_VERSION = '3.5.0';
|
|
4158
4211
|
|
|
4159
4212
|
function shouldDropEvent(cxRumEvent, options) {
|
|
4160
4213
|
if (isDocumentErrorWithoutMessage(cxRumEvent)) {
|
|
@@ -5031,13 +5084,13 @@ var CoralogixRum = {
|
|
|
5031
5084
|
getSessionRecorder().startRecording();
|
|
5032
5085
|
return;
|
|
5033
5086
|
}
|
|
5034
|
-
var intervalId =
|
|
5087
|
+
var intervalId = cxSetInterval(function () {
|
|
5035
5088
|
if (getSessionRecorder()) {
|
|
5036
|
-
|
|
5089
|
+
cxClearInterval(intervalId);
|
|
5037
5090
|
getSessionRecorder().startRecording();
|
|
5038
5091
|
}
|
|
5039
5092
|
}, 300);
|
|
5040
|
-
|
|
5093
|
+
cxSetTimeout(function () { return cxClearInterval(intervalId); }, 3000);
|
|
5041
5094
|
},
|
|
5042
5095
|
screenshot: function (description) {
|
|
5043
5096
|
var _a;
|
|
@@ -5167,4 +5220,4 @@ var SessionRecordingEventType;
|
|
|
5167
5220
|
SessionRecordingEventType[SessionRecordingEventType["Plugin"] = 6] = "Plugin";
|
|
5168
5221
|
})(SessionRecordingEventType || (SessionRecordingEventType = {}));
|
|
5169
5222
|
|
|
5170
|
-
export { BATCH_TIME_DELAY as B, CxGlobal as C, MAX_BATCH_TIME_MS as M, OtelNetworkAttrs as O, PerformanceTypes as P, Request as R, SESSION_RECORDER_SEGMENTS_MAP as S, UrlBasedLabelProvider as U,
|
|
5223
|
+
export { BATCH_TIME_DELAY as B, CxGlobal as C, MAX_BATCH_TIME_MS as M, OtelNetworkAttrs as O, PerformanceTypes as P, Request as R, SESSION_RECORDER_SEGMENTS_MAP as S, UrlBasedLabelProvider as U, cxClearTimeout as a, createCxMutationObserver as b, cxSetTimeout as c, cxRequestAnimationFrame as d, cxCancelAnimationFrame as e, cxClearInterval as f, getZoneJsOriginalDom as g, getSdkConfig as h, getNowTime as i, SESSION_RECORDING_NETWORK_ERR0R_MESSAGE as j, cxSetInterval as k, SESSION_RECORDING_DEFAULT_HEADERS as l, SESSION_RECORDING_POSTFIX_URL as m, SESSION_RECORDER_KEY as n, SESSION_RECORDING_DEFAULT_ERROR_MESSAGE as o, CoralogixRum as p, CoralogixLogSeverity as q, SessionRecordingEventType as r, CoralogixEventType as s, UrlType as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coralogix/browser",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Official Coralogix SDK for browsers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Coralogix",
|
|
@@ -27,9 +27,7 @@
|
|
|
27
27
|
"@opentelemetry/propagator-b3": "1.25.1",
|
|
28
28
|
"@opentelemetry/sdk-trace-base": "1.25.1",
|
|
29
29
|
"@opentelemetry/sdk-trace-web": "1.25.1",
|
|
30
|
-
"@rrweb/rrweb-plugin-console-record": "2.0.0-alpha.15",
|
|
31
30
|
"error-stack-parser": "2.1.4",
|
|
32
|
-
"rrweb": "2.0.0-alpha.15",
|
|
33
31
|
"tslib": "2.6.3",
|
|
34
32
|
"web-vitals": "4.2.3-soft-navs"
|
|
35
33
|
},
|