@coralogix/browser 3.8.0 → 3.8.3

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,21 @@
1
+ ## 3.8.3 (2026-05-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - Improve web vitals attribution data by preventing deep nesting
6
+
7
+ ## 3.8.2 (2026-05-06)
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - run web vitals listeners outside zone
12
+
13
+ ## 3.8.1 (2026-05-06)
14
+
15
+ ### 🩹 Fixes
16
+
17
+ Improve error stack trace handling.
18
+
1
19
  ## 3.8.0 (2026-04-27)
2
20
 
3
21
  ### 🚀 Features
package/index.esm2.js CHANGED
@@ -374,6 +374,23 @@ var STACK_FRAME_LIMIT = 50;
374
374
  var STACK_LINE_LIMIT = 1024;
375
375
  var MESSAGE_LIMIT = 1024;
376
376
  var MFE_PATH_PATTERN = /https?:\/\/.*\//;
377
+ var V8_HEADER_PATTERN = /^Error\b/;
378
+ function sanitizeConsoleErrorStack(stack) {
379
+ var _a;
380
+ if (!stack)
381
+ return stack;
382
+ var lines = stack.split('\n');
383
+ if (lines.length === 0)
384
+ return stack;
385
+ if (V8_HEADER_PATTERN.test(lines[0])) {
386
+ lines = lines.slice(1);
387
+ }
388
+ lines = lines.slice(1);
389
+ if ((_a = getSessionRecorder()) === null || _a === void 0 ? void 0 : _a.isConsoleRecordingActive()) {
390
+ lines = lines.slice(1);
391
+ }
392
+ return lines.join('\n');
393
+ }
377
394
  function extractMfePath(fileName) {
378
395
  var _a;
379
396
  var _b = __read$1((_a = fileName.match(MFE_PATH_PATTERN)) !== null && _a !== void 0 ? _a : [], 1), mfePath = _b[0];
@@ -526,6 +543,7 @@ var _consoleErrorHandler = function (errorInstrumentation) {
526
543
  args[_i] = arguments[_i];
527
544
  }
528
545
  var stackContextError = new Error();
546
+ stackContextError.stack = sanitizeConsoleErrorStack(stackContextError.stack);
529
547
  errorInstrumentation.report(ErrorSource.CONSOLE, args, stackContextError);
530
548
  return original.apply(console, args);
531
549
  };
@@ -1277,16 +1295,6 @@ var XHR_INSTRUMENTATION_NAME = 'xhr';
1277
1295
  var FETCH_INSTRUMENTATION_NAME = 'fetch';
1278
1296
  var CUSTOM_INSTRUMENTATION_NAME = 'custom';
1279
1297
  var SESSION_RECORDING_INSTRUMENTATION_NAME = 'session_recording';
1280
- var ALL_WEB_VITALS_METRICS = {
1281
- lcp: true,
1282
- fid: true,
1283
- cls: true,
1284
- fcp: true,
1285
- inp: true,
1286
- ttfb: true,
1287
- tbt: false,
1288
- lt: true,
1289
- };
1290
1298
  var LONGTASK_DURATION = 50;
1291
1299
  var INTERNAL_INSTRUMENTATION_NAME = 'internal';
1292
1300
  var FONTS_URL = 'fonts.googleapis.com';
@@ -1328,6 +1336,75 @@ var IMG_EXTENSIONS = [
1328
1336
  '.webp',
1329
1337
  ];
1330
1338
 
1339
+ var ALL_WEB_VITALS_METRICS = {
1340
+ lcp: true,
1341
+ fid: true,
1342
+ cls: true,
1343
+ fcp: true,
1344
+ inp: true,
1345
+ ttfb: true,
1346
+ tbt: false,
1347
+ lt: true,
1348
+ };
1349
+
1350
+ var attributionSanitizers = {
1351
+ LCP: function (metric) {
1352
+ metric.entries; var attribution = metric.attribution, rest = __rest(metric, ["entries", "attribution"]);
1353
+ var lcpEntry = attribution.lcpEntry;
1354
+ return __assign(__assign({}, rest), { attribution: {
1355
+ element: attribution.element,
1356
+ url: attribution.url,
1357
+ timeToFirstByte: attribution.timeToFirstByte,
1358
+ resourceLoadDelay: attribution.resourceLoadDelay,
1359
+ resourceLoadDuration: attribution.resourceLoadDuration,
1360
+ elementRenderDelay: attribution.elementRenderDelay,
1361
+ lcpEntry: lcpEntry && {
1362
+ url: lcpEntry.url,
1363
+ size: lcpEntry.size,
1364
+ loadTime: lcpEntry.loadTime,
1365
+ renderTime: lcpEntry.renderTime,
1366
+ startTime: lcpEntry.startTime,
1367
+ },
1368
+ } });
1369
+ },
1370
+ FCP: function (metric) {
1371
+ metric.entries; var attribution = metric.attribution, rest = __rest(metric, ["entries", "attribution"]);
1372
+ return __assign(__assign({}, rest), { attribution: {
1373
+ loadState: attribution.loadState,
1374
+ fcpEntry: attribution.fcpEntry && {
1375
+ duration: attribution.fcpEntry.duration,
1376
+ startTime: attribution.fcpEntry.startTime,
1377
+ },
1378
+ } });
1379
+ },
1380
+ CLS: function (metric) {
1381
+ metric.entries; var attribution = metric.attribution, rest = __rest(metric, ["entries", "attribution"]);
1382
+ return __assign(__assign({}, rest), { attribution: {
1383
+ largestShiftTarget: attribution.largestShiftTarget,
1384
+ largestShiftTime: attribution.largestShiftTime,
1385
+ largestShiftValue: attribution.largestShiftValue,
1386
+ loadState: attribution.loadState,
1387
+ } });
1388
+ },
1389
+ FID: function (metric) {
1390
+ metric.entries; var attribution = metric.attribution, rest = __rest(metric, ["entries", "attribution"]);
1391
+ return __assign(__assign({}, rest), { attribution: {
1392
+ eventTarget: attribution.eventTarget,
1393
+ eventType: attribution.eventType,
1394
+ loadState: attribution.loadState,
1395
+ } });
1396
+ },
1397
+ TTFB: function (metric) {
1398
+ metric.entries; var attribution = metric.attribution, rest = __rest(metric, ["entries", "attribution"]);
1399
+ attribution.navigationEntry; var sanitizedAttribution = __rest(attribution, ["navigationEntry"]);
1400
+ return __assign(__assign({}, rest), { attribution: sanitizedAttribution });
1401
+ },
1402
+ INP: function (metric) {
1403
+ metric.entries; metric.attribution; var rest = __rest(metric, ["entries", "attribution"]);
1404
+ return rest;
1405
+ },
1406
+ };
1407
+
1331
1408
  function getBrowserWindow() {
1332
1409
  return CxGlobal;
1333
1410
  }
@@ -1385,6 +1462,16 @@ function createCxMutationObserver(callback) {
1385
1462
  var OriginalMutationObserver = getZoneJsOriginalDom(browserWindow, 'MutationObserver');
1386
1463
  return new OriginalMutationObserver(callback);
1387
1464
  }
1465
+ function cxRunOutsideZone(fn) {
1466
+ if (!shouldRunOutsideZone()) {
1467
+ return fn();
1468
+ }
1469
+ var zone = getBrowserWindow().Zone;
1470
+ if (zone && zone.root && typeof zone.root.run === 'function') {
1471
+ return zone.root.run(fn);
1472
+ }
1473
+ return fn();
1474
+ }
1388
1475
 
1389
1476
  /** Original source: https://www.npmjs.com/package/tti-polyfill?activeTab=code
1390
1477
  * @license Apache-2.0
@@ -1655,6 +1742,26 @@ function isPerformanceObserverSupported() {
1655
1742
  return true;
1656
1743
  }
1657
1744
 
1745
+ function sanitizeAttribution(metric) {
1746
+ if (!('attribution' in metric)) {
1747
+ metric.entries; var rest = __rest(metric, ["entries"]);
1748
+ return rest;
1749
+ }
1750
+ switch (metric.name) {
1751
+ case 'LCP':
1752
+ return attributionSanitizers.LCP(metric);
1753
+ case 'FCP':
1754
+ return attributionSanitizers.FCP(metric);
1755
+ case 'CLS':
1756
+ return attributionSanitizers.CLS(metric);
1757
+ case 'FID':
1758
+ return attributionSanitizers.FID(metric);
1759
+ case 'TTFB':
1760
+ return attributionSanitizers.TTFB(metric);
1761
+ case 'INP':
1762
+ return attributionSanitizers.INP(metric);
1763
+ }
1764
+ }
1658
1765
  var CoralogixWebVitalsInstrumentation = (function (_super) {
1659
1766
  __extends(CoralogixWebVitalsInstrumentation, _super);
1660
1767
  function CoralogixWebVitalsInstrumentation(config) {
@@ -1669,11 +1776,7 @@ var CoralogixWebVitalsInstrumentation = (function (_super) {
1669
1776
  _this.registerToTBTMetric();
1670
1777
  }
1671
1778
  var webVitalsSpan = _this.tracer.startSpan(CoralogixEventType.WEB_VITALS);
1672
- var metricData = metric.entries ? omit(metric, 'entries') : metric;
1673
- metricData = omit(metricData, 'attribution.navigationEntry');
1674
- if (metricData.name === 'INP') {
1675
- metricData = omit(metricData, 'attribution');
1676
- }
1779
+ var metricData = sanitizeAttribution(metric);
1677
1780
  webVitalsSpan.setAttribute(CoralogixAttributes.EVENT_TYPE, CoralogixEventType.WEB_VITALS);
1678
1781
  webVitalsSpan.setAttribute(WEB_VITALS_INSTRUMENTATION_NAME, JSON.stringify(metricData, getCircularReplacer()));
1679
1782
  webVitalsSpan.end();
@@ -1684,11 +1787,13 @@ var CoralogixWebVitalsInstrumentation = (function (_super) {
1684
1787
  if (!isPerformanceObserverSupported()) {
1685
1788
  return _this;
1686
1789
  }
1687
- _this.registerToCoreWebVitalMetrics();
1688
- _this.registerToCalculatedWebVitalMetrics();
1689
- if (_this.isSoftNavsEnabled) {
1690
- _this.registerToSoftNavigations();
1691
- }
1790
+ cxRunOutsideZone(function () {
1791
+ _this.registerToCoreWebVitalMetrics();
1792
+ _this.registerToCalculatedWebVitalMetrics();
1793
+ if (_this.isSoftNavsEnabled) {
1794
+ _this.registerToSoftNavigations();
1795
+ }
1796
+ });
1692
1797
  return _this;
1693
1798
  }
1694
1799
  CoralogixWebVitalsInstrumentation.prototype.registerToCoreWebVitalMetrics = function () {
@@ -1793,11 +1898,12 @@ var CoralogixWebVitalsInstrumentation = (function (_super) {
1793
1898
  var _a, _b;
1794
1899
  if (tti) {
1795
1900
  _this.onReport(tbtMetric);
1796
- _this.onReport({
1901
+ var ttiMetric = {
1797
1902
  name: 'TTI',
1798
1903
  value: tti,
1799
1904
  id: generateWebVitalUniqueID(),
1800
- });
1905
+ };
1906
+ _this.onReport(ttiMetric);
1801
1907
  totalBLockingTimeObserver.disconnect();
1802
1908
  (_b = (_a = CxGlobal.__tti) === null || _a === void 0 ? void 0 : _a.o) === null || _b === void 0 ? void 0 : _b.disconnect();
1803
1909
  }
@@ -4270,7 +4376,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
4270
4376
  return resolvedUrlBlueprinters;
4271
4377
  }
4272
4378
 
4273
- var SDK_VERSION = '3.8.0';
4379
+ var SDK_VERSION = '3.8.3';
4274
4380
 
4275
4381
  function shouldDropEvent(cxRumEvent, options) {
4276
4382
  if (isDocumentErrorWithoutMessage(cxRumEvent)) {
@@ -5283,4 +5389,4 @@ var SessionRecordingEventType;
5283
5389
  SessionRecordingEventType[SessionRecordingEventType["Plugin"] = 6] = "Plugin";
5284
5390
  })(SessionRecordingEventType || (SessionRecordingEventType = {}));
5285
5391
 
5286
- 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 };
5392
+ 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, getSdkConfig as f, getZoneJsOriginalDom as g, cxClearInterval 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.8.0",
3
+ "version": "3.8.3",
4
4
  "description": "Official Coralogix SDK for browsers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
@@ -1,5 +1,5 @@
1
1
  import { __values, __spreadArray, __read, __assign, __awaiter, __generator, __rest } from 'tslib';
2
- import { c as cxSetTimeout, a as cxClearTimeout, g as getZoneJsOriginalDom, b as createCxMutationObserver, d as cxRequestAnimationFrame, e as cxCancelAnimationFrame, C as CxGlobal, f as cxClearInterval, h as getSdkConfig, S as SESSION_RECORDER_SEGMENTS_MAP, i as getNowTime, j as SESSION_RECORDING_NETWORK_ERR0R_MESSAGE, k as cxSetInterval, R as Request, l as SESSION_RECORDING_DEFAULT_HEADERS, m as SESSION_RECORDING_POSTFIX_URL, B as BATCH_TIME_DELAY, n as SESSION_RECORDER_KEY, o as SESSION_RECORDING_DEFAULT_ERROR_MESSAGE, M as MAX_BATCH_TIME_MS } from './index.esm2.js';
2
+ import { c as cxSetTimeout, a as cxClearTimeout, g as getZoneJsOriginalDom, b as createCxMutationObserver, d as cxRequestAnimationFrame, e as cxCancelAnimationFrame, C as CxGlobal, f as getSdkConfig, h as cxClearInterval, S as SESSION_RECORDER_SEGMENTS_MAP, i as getNowTime, j as SESSION_RECORDING_NETWORK_ERR0R_MESSAGE, k as cxSetInterval, R as Request, l as SESSION_RECORDING_DEFAULT_HEADERS, m as SESSION_RECORDING_POSTFIX_URL, B as BATCH_TIME_DELAY, n as SESSION_RECORDER_KEY, o as SESSION_RECORDING_DEFAULT_ERROR_MESSAGE, M as MAX_BATCH_TIME_MS } from './index.esm2.js';
3
3
  import '@opentelemetry/sdk-trace-base';
4
4
  import '@opentelemetry/sdk-trace-web';
5
5
  import '@opentelemetry/instrumentation';
@@ -5818,6 +5818,10 @@ var SessionRecorder = (function () {
5818
5818
  SessionRecorder.prototype.getIsAutoStartRecording = function () {
5819
5819
  return this.isAutoStartRecording;
5820
5820
  };
5821
+ SessionRecorder.prototype.isConsoleRecordingActive = function () {
5822
+ var _a;
5823
+ return !!this.recordRef && ((_a = getSdkConfig().sessionRecordingConfig) === null || _a === void 0 ? void 0 : _a.recordConsoleEvents) === true;
5824
+ };
5821
5825
  Object.defineProperty(SessionRecorder.prototype, "recordingStopDueToTimeout", {
5822
5826
  get: function () {
5823
5827
  return this._recordingStopDueToTimeout;
@@ -2,6 +2,7 @@ import { InstrumentationBase, InstrumentationConfig } from '@opentelemetry/instr
2
2
  import { CoralogixRumLabels, CxStackFrame } from '../types';
3
3
  export declare const STACK_FRAME_LIMIT = 50;
4
4
  export declare const STACK_LINE_LIMIT = 1024;
5
+ export declare function sanitizeConsoleErrorStack(stack: string | undefined): string | undefined;
5
6
  export declare function extractMfePath(fileName: string): string | undefined;
6
7
  export declare const ERROR_INSTRUMENTATION_NAME = "errors";
7
8
  export declare const ErrorAttributes: {
@@ -1,4 +1,3 @@
1
- import { CoralogixWebVitalsMetrics } from './instrumentation.model';
2
1
  export declare const WEB_VITALS_INSTRUMENTATION_NAME = "web_vitals";
3
2
  export declare const WEB_VITALS_INSTRUMENTATION_VERSION = "1.0.0";
4
3
  export declare const LONG_TASK_INSTRUMENTATION_VERSION = "1.0.0";
@@ -15,7 +14,6 @@ export declare const XHR_INSTRUMENTATION_NAME = "xhr";
15
14
  export declare const FETCH_INSTRUMENTATION_NAME = "fetch";
16
15
  export declare const CUSTOM_INSTRUMENTATION_NAME = "custom";
17
16
  export declare const SESSION_RECORDING_INSTRUMENTATION_NAME = "session_recording";
18
- export declare const ALL_WEB_VITALS_METRICS: CoralogixWebVitalsMetrics;
19
17
  export declare const LONGTASK_DURATION = 50;
20
18
  export declare const INTERNAL_INSTRUMENTATION_NAME = "internal";
21
19
  export declare const FONTS_URL = "fonts.googleapis.com";
@@ -1,18 +1,4 @@
1
- import { InstrumentationConfig } from '@opentelemetry/instrumentation';
2
1
  import { CoralogixEventType, CoralogixOtelWebOptionsInstrumentations } from '../types';
3
- export interface CoralogixWebVitalsMetrics {
4
- lcp: boolean;
5
- fid: boolean;
6
- cls: boolean;
7
- inp: boolean;
8
- ttfb: boolean;
9
- fcp: boolean;
10
- tbt: boolean;
11
- lt: boolean;
12
- }
13
- export interface CoralogixWebVitalsInstrumentationConfig extends InstrumentationConfig {
14
- metrics: Partial<CoralogixWebVitalsMetrics>;
15
- }
16
2
  export declare enum ResourceInitiatorTypes {
17
3
  Media = "media",
18
4
  Script = "script",
@@ -1,5 +1,5 @@
1
1
  import { InstrumentationBase } from '@opentelemetry/instrumentation';
2
- import { CoralogixWebVitalsInstrumentationConfig } from './instrumentation.model';
2
+ import { CoralogixWebVitalsInstrumentationConfig } from './web-vitals.types';
3
3
  export declare class CoralogixWebVitalsInstrumentation extends InstrumentationBase {
4
4
  private metrics;
5
5
  private observers;
@@ -0,0 +1,2 @@
1
+ import { SanitizerMap } from './web-vitals.types';
2
+ export declare const attributionSanitizers: SanitizerMap;
@@ -0,0 +1,64 @@
1
+ import { CLSMetricWithAttribution, FCPMetricWithAttribution, FIDMetricWithAttribution, INPMetricWithAttribution, LCPMetricWithAttribution, Metric, TTFBMetricWithAttribution } from 'web-vitals/attribution';
2
+ import { WebVitalsRating } from '../../types';
3
+ import { InstrumentationConfig } from '@opentelemetry/instrumentation';
4
+ export type CustomMetric = {
5
+ name: 'SN' | 'LT' | 'TBT' | 'TTI';
6
+ id: string;
7
+ value: number;
8
+ url?: string;
9
+ navigationType?: Metric['navigationType'];
10
+ navigationId?: string;
11
+ startTime?: number;
12
+ rating?: WebVitalsRating;
13
+ entries?: PerformanceEntry[];
14
+ };
15
+ export type LoadingTimeMetric = CustomMetric & Partial<PerformanceNavigationTiming>;
16
+ type LCPAttribution = LCPMetricWithAttribution['attribution'];
17
+ type FCPAttribution = FCPMetricWithAttribution['attribution'];
18
+ type CLSAttribution = CLSMetricWithAttribution['attribution'];
19
+ type FIDAttribution = FIDMetricWithAttribution['attribution'];
20
+ type TTFBAttribution = TTFBMetricWithAttribution['attribution'];
21
+ type SanitizedLCPMetric = Omit<LCPMetricWithAttribution, 'entries' | 'attribution'> & {
22
+ attribution: Pick<LCPAttribution, 'element' | 'url' | 'timeToFirstByte' | 'resourceLoadDelay' | 'resourceLoadDuration' | 'elementRenderDelay'> & {
23
+ lcpEntry?: Pick<NonNullable<LCPAttribution['lcpEntry']>, 'url' | 'size' | 'loadTime' | 'renderTime' | 'startTime'>;
24
+ };
25
+ };
26
+ type SanitizedFCPMetric = Omit<FCPMetricWithAttribution, 'entries' | 'attribution'> & {
27
+ attribution: Pick<FCPAttribution, 'loadState'> & {
28
+ fcpEntry?: Pick<NonNullable<FCPAttribution['fcpEntry']>, 'duration' | 'startTime'>;
29
+ };
30
+ };
31
+ type SanitizedCLSMetric = Omit<CLSMetricWithAttribution, 'entries' | 'attribution'> & {
32
+ attribution: Pick<CLSAttribution, 'largestShiftTarget' | 'largestShiftTime' | 'largestShiftValue' | 'loadState'>;
33
+ };
34
+ type SanitizedFIDMetric = Omit<FIDMetricWithAttribution, 'entries' | 'attribution'> & {
35
+ attribution: Pick<FIDAttribution, 'eventTarget' | 'eventType' | 'loadState'>;
36
+ };
37
+ export type SanitizedTTFBMetric = Omit<TTFBMetricWithAttribution, 'entries' | 'attribution'> & {
38
+ attribution: Omit<TTFBAttribution, 'navigationEntry'>;
39
+ };
40
+ type SanitizedINPMetric = Omit<INPMetricWithAttribution, 'entries' | 'attribution'>;
41
+ export type SanitizedMetric = SanitizedLCPMetric | SanitizedFCPMetric | SanitizedCLSMetric | SanitizedFIDMetric | SanitizedTTFBMetric | SanitizedINPMetric | CustomMetric;
42
+ export type SanitizerMap = {
43
+ LCP: (m: LCPMetricWithAttribution) => SanitizedLCPMetric;
44
+ FCP: (m: FCPMetricWithAttribution) => SanitizedFCPMetric;
45
+ CLS: (m: CLSMetricWithAttribution) => SanitizedCLSMetric;
46
+ FID: (m: FIDMetricWithAttribution) => SanitizedFIDMetric;
47
+ TTFB: (m: TTFBMetricWithAttribution) => SanitizedTTFBMetric;
48
+ INP: (m: INPMetricWithAttribution) => SanitizedINPMetric;
49
+ };
50
+ export interface CoralogixWebVitalsMetrics {
51
+ lcp: boolean;
52
+ fid: boolean;
53
+ cls: boolean;
54
+ inp: boolean;
55
+ ttfb: boolean;
56
+ fcp: boolean;
57
+ tbt: boolean;
58
+ lt: boolean;
59
+ }
60
+ export interface CoralogixWebVitalsInstrumentationConfig extends InstrumentationConfig {
61
+ metrics: Partial<CoralogixWebVitalsMetrics>;
62
+ }
63
+ export declare const ALL_WEB_VITALS_METRICS: CoralogixWebVitalsMetrics;
64
+ export {};
@@ -28,6 +28,7 @@ export declare class SessionRecorder {
28
28
  getSessionHasRecording(): boolean;
29
29
  updateSegmentIndexCounter(segmentIndexCounter: Record<string, number>): void;
30
30
  getIsAutoStartRecording(): boolean;
31
+ isConsoleRecordingActive(): boolean;
31
32
  set recordingStopDueToTimeout(value: boolean);
32
33
  get recordingStopDueToTimeout(): boolean;
33
34
  startRecording(): Promise<void>;
@@ -23,3 +23,4 @@ export declare function cxClearInterval(id: ReturnType<typeof setInterval>): voi
23
23
  export declare function cxRequestAnimationFrame(callback: FrameRequestCallback): number;
24
24
  export declare function cxCancelAnimationFrame(id: number): void;
25
25
  export declare function createCxMutationObserver(callback: MutationCallback): MutationObserver;
26
+ export declare function cxRunOutsideZone<T>(fn: () => T): T;
package/src/types.d.ts CHANGED
@@ -8,7 +8,7 @@ import { LogSource } from './instrumentations/CoralogixCustomLogInstrumentation'
8
8
  import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
9
9
  import { CoralogixUserInteractionInstrumentationConfig } from './instrumentations/user-interaction/CoralogixUserInteractionInstrumentation';
10
10
  import { Metric } from 'web-vitals/attribution';
11
- import { CoralogixWebVitalsInstrumentationConfig } from './instrumentations/instrumentation.model';
11
+ import { CoralogixWebVitalsInstrumentationConfig } from './instrumentations/web-vitals/web-vitals.types';
12
12
  import { SessionConfig, SessionRecordingConfig } from './session/session.model';
13
13
  import { CoralogixInternalEvent } from './instrumentations/CoralogixInternalInstrumentation';
14
14
  import { SnapshotContext } from './snapshot/snapshot.model';
package/src/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.8.0";
1
+ export declare const SDK_VERSION = "3.8.3";