@coralogix/browser 2.14.0 → 3.0.1
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 +34 -0
- package/README.md +18 -0
- package/index.esm2.js +3 -3
- package/package.json +1 -1
- package/sessionRecorder.esm.js +5 -2
- package/src/session/sessionRecorder.d.ts +1 -0
- package/src/version.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
## 3.0.1 (2026-01-18)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
- Improve session recorder performance
|
|
5
|
+
|
|
6
|
+
# 3.0.0 (2025-12-25)
|
|
7
|
+
|
|
8
|
+
### 🔥 Performance
|
|
9
|
+
|
|
10
|
+
- ⚠️ **browser:** disable TBT metric by default to reduce overhead.
|
|
11
|
+
|
|
12
|
+
### ⚠️ Breaking Changes
|
|
13
|
+
|
|
14
|
+
- TBT web-vitals metric is no longer collected by default. Enable it explicitly via config.
|
|
15
|
+
|
|
16
|
+
**For example**:
|
|
17
|
+
|
|
18
|
+
**Before**
|
|
19
|
+
All Web Vitals instrumentation metrics are enabled by default.
|
|
20
|
+
|
|
21
|
+
**After**
|
|
22
|
+
To enable the **TBT** metric, explicitly configure it as shown below:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"instrumentations": {
|
|
27
|
+
"web_vitals": {
|
|
28
|
+
"metrics": {
|
|
29
|
+
"tbt": true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
1
35
|
## 2.14.0 (2025-12-07)
|
|
2
36
|
|
|
3
37
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -242,6 +242,24 @@ CoralogixRum.init({
|
|
|
242
242
|
});
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
+
##### Web Vitals: TBT metric
|
|
246
|
+
|
|
247
|
+
By default, the **TBT** (Total Blocking Time) metric is disabled.
|
|
248
|
+
To enable it, explicitly configure it as shown below:
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"instrumentations": {
|
|
253
|
+
"web_vitals": {
|
|
254
|
+
"enabled": true,
|
|
255
|
+
"metrics": {
|
|
256
|
+
"tbt": true
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
245
263
|
### Manually Capture Errors
|
|
246
264
|
|
|
247
265
|
You can pass an Error object to capture it as an event.<br>
|
package/index.esm2.js
CHANGED
|
@@ -1239,7 +1239,7 @@ var ALL_WEB_VITALS_METRICS = {
|
|
|
1239
1239
|
fcp: true,
|
|
1240
1240
|
inp: true,
|
|
1241
1241
|
ttfb: true,
|
|
1242
|
-
tbt:
|
|
1242
|
+
tbt: false,
|
|
1243
1243
|
lt: true,
|
|
1244
1244
|
};
|
|
1245
1245
|
var LONGTASK_DURATION = 50;
|
|
@@ -1577,7 +1577,7 @@ var CoralogixWebVitalsInstrumentation = (function (_super) {
|
|
|
1577
1577
|
};
|
|
1578
1578
|
_this.metrics = isEmpty(config.metrics)
|
|
1579
1579
|
? ALL_WEB_VITALS_METRICS
|
|
1580
|
-
: config.metrics;
|
|
1580
|
+
: __assign(__assign({}, ALL_WEB_VITALS_METRICS), config.metrics);
|
|
1581
1581
|
if (!isPerformanceObserverSupported()) {
|
|
1582
1582
|
return _this;
|
|
1583
1583
|
}
|
|
@@ -4138,7 +4138,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
|
|
|
4138
4138
|
return resolvedUrlBlueprinters;
|
|
4139
4139
|
}
|
|
4140
4140
|
|
|
4141
|
-
var SDK_VERSION = '
|
|
4141
|
+
var SDK_VERSION = '3.0.1';
|
|
4142
4142
|
|
|
4143
4143
|
function shouldDropEvent(cxRumEvent, options) {
|
|
4144
4144
|
if (isDocumentErrorWithoutMessage(cxRumEvent)) {
|
package/package.json
CHANGED
package/sessionRecorder.esm.js
CHANGED
|
@@ -1484,6 +1484,7 @@ var SessionRecorder = (function () {
|
|
|
1484
1484
|
this.isErrorOccurred = false;
|
|
1485
1485
|
this.debugMode = !!((_a = getSdkConfig()) === null || _a === void 0 ? void 0 : _a.debug);
|
|
1486
1486
|
this._recordingStopDueToTimeout = false;
|
|
1487
|
+
this.mutationCallbackCount = 0;
|
|
1487
1488
|
this.handleRecordEvent = function (event, isCheckout) {
|
|
1488
1489
|
if (!_this.recordingStopped) {
|
|
1489
1490
|
if (_this.onlySessionWithErrorMode) {
|
|
@@ -1606,6 +1607,7 @@ var SessionRecorder = (function () {
|
|
|
1606
1607
|
if (this.debugMode) {
|
|
1607
1608
|
console.debug('Coralogix Browser SDK - Session recording started');
|
|
1608
1609
|
}
|
|
1610
|
+
this.mutationCallbackCount = 0;
|
|
1609
1611
|
this.startMutationObserver();
|
|
1610
1612
|
this.resetBatching();
|
|
1611
1613
|
this.recordingStopped = false;
|
|
@@ -1655,8 +1657,9 @@ var SessionRecorder = (function () {
|
|
|
1655
1657
|
var _this = this;
|
|
1656
1658
|
this.stopMutationObserver();
|
|
1657
1659
|
this.mutationObserver = new MutationObserver(function (mutations) {
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
+
_this.mutationCallbackCount++;
|
|
1661
|
+
if (_this.mutationCallbackCount > _this.maxMutations) {
|
|
1662
|
+
var message = "Coralogix Browser SDK - Recording stopped due to too many mutations ".concat(_this.mutationCallbackCount);
|
|
1660
1663
|
console.warn(message);
|
|
1661
1664
|
reportInternalEvent('recording-stop', message);
|
|
1662
1665
|
_this.stopRecording();
|
|
@@ -25,6 +25,7 @@ export declare class SessionRecorder {
|
|
|
25
25
|
private request;
|
|
26
26
|
private workerManager;
|
|
27
27
|
private isWorkerReady;
|
|
28
|
+
private mutationCallbackCount;
|
|
28
29
|
constructor(sessionManager: SessionManager, recordConfig: SessionRecordingConfig);
|
|
29
30
|
getSessionHasScreenshot(): boolean;
|
|
30
31
|
getSessionHasRecording(): boolean;
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "3.0.1";
|