@coralogix/browser 3.0.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 CHANGED
@@ -1,3 +1,8 @@
1
+ ## 3.0.1 (2026-01-18)
2
+
3
+ ### 🩹 Fixes
4
+ - Improve session recorder performance
5
+
1
6
  # 3.0.0 (2025-12-25)
2
7
 
3
8
  ### 🔥 Performance
package/index.esm2.js CHANGED
@@ -4138,7 +4138,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
4138
4138
  return resolvedUrlBlueprinters;
4139
4139
  }
4140
4140
 
4141
- var SDK_VERSION = '3.0.0';
4141
+ var SDK_VERSION = '3.0.1';
4142
4142
 
4143
4143
  function shouldDropEvent(cxRumEvent, options) {
4144
4144
  if (isDocumentErrorWithoutMessage(cxRumEvent)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/browser",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Official Coralogix SDK for browsers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
@@ -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
- if (mutations.length > _this.maxMutations) {
1659
- var message = "Coralogix Browser SDK - Recording stopped due to too many mutations ".concat(mutations.length);
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 = "3.0.0";
1
+ export declare const SDK_VERSION = "3.0.1";