@coralogix/browser 2.7.0 → 2.8.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 +12 -0
- package/README.md +8 -0
- package/index.esm2.js +10 -6
- package/package.json +1 -1
- package/sessionRecorder.esm.js +12 -3
- package/src/constants.d.ts +6 -71
- package/src/instrumentations/instrumentation.model.d.ts +9 -0
- package/src/instrumentations/user-interaction/CoralogixUserInteractionInstrumentation.d.ts +1 -1
- package/src/version.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -893,9 +893,17 @@ You can choose your desired version.
|
|
|
893
893
|
|
|
894
894
|
#### Specific Version (recommended)
|
|
895
895
|
|
|
896
|
+
By default, the CDN is built using the <b>ES2015 (ES6)</b> standard.<br>
|
|
897
|
+
|
|
896
898
|
https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js \
|
|
897
899
|
Replace [version] with a version from [Releases page](https://www.npmjs.com/package/@coralogix/browser?activeTab=versions).
|
|
898
900
|
|
|
901
|
+
#### ES5
|
|
902
|
+
|
|
903
|
+
If you are targeting legacy environments, make sure to use the ES5-compatible version.
|
|
904
|
+
|
|
905
|
+
https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.es5.js
|
|
906
|
+
|
|
899
907
|
> _**Note: CDN latest has no longer maintained, please use an explicit version instead.**_
|
|
900
908
|
|
|
901
909
|
### Add the CDN script to your application
|
package/index.esm2.js
CHANGED
|
@@ -1536,7 +1536,7 @@ C.prototype.m = function (a) {
|
|
|
1536
1536
|
this.f.set(a, performance.now());
|
|
1537
1537
|
};
|
|
1538
1538
|
C.prototype.l = function (a) {
|
|
1539
|
-
this.f
|
|
1539
|
+
this.f["delete"](a);
|
|
1540
1540
|
};
|
|
1541
1541
|
C.prototype.B = function () {
|
|
1542
1542
|
G(this, performance.now() + 5e3);
|
|
@@ -2062,7 +2062,7 @@ function getTextualContent(element) {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
2064
|
var _a$3;
|
|
2065
|
-
var USER_INTERACTION_INSTRUMENTATION_NAME = '
|
|
2065
|
+
var USER_INTERACTION_INSTRUMENTATION_NAME = 'interactions';
|
|
2066
2066
|
var USER_INTERACTION_INSTRUMENTATION_VERSION = '1';
|
|
2067
2067
|
var DEFAULT_INSTRUMENTED_EVENTS = (_a$3 = {},
|
|
2068
2068
|
_a$3["click" /* DOM_EVENT.CLICK */] = true,
|
|
@@ -2555,6 +2555,10 @@ var OPTIONS_DEFAULTS = {
|
|
|
2555
2555
|
urlBlueprinters: defaultUrlBlueprinters,
|
|
2556
2556
|
collectIPData: true,
|
|
2557
2557
|
};
|
|
2558
|
+
/**
|
|
2559
|
+
* Note: For any instrumentation added to CoralogixOtelWebOptionsInstrumentations,
|
|
2560
|
+
* The `confKey` must match one of its keys.
|
|
2561
|
+
*/
|
|
2558
2562
|
var INSTRUMENTATIONS = [
|
|
2559
2563
|
{
|
|
2560
2564
|
Instrument: CoralogixErrorInstrumentation,
|
|
@@ -3277,7 +3281,7 @@ var CompositePropagator = /** @class */function () {
|
|
|
3277
3281
|
};
|
|
3278
3282
|
} finally {
|
|
3279
3283
|
try {
|
|
3280
|
-
if (_c && !_c.done && (_a = _b
|
|
3284
|
+
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
|
3281
3285
|
} finally {
|
|
3282
3286
|
if (e_1) throw e_1.error;
|
|
3283
3287
|
}
|
|
@@ -3387,14 +3391,14 @@ var TraceState = /** @class */function () {
|
|
|
3387
3391
|
// use the faster one.
|
|
3388
3392
|
var traceState = this._clone();
|
|
3389
3393
|
if (traceState._internalState.has(key)) {
|
|
3390
|
-
traceState._internalState
|
|
3394
|
+
traceState._internalState["delete"](key);
|
|
3391
3395
|
}
|
|
3392
3396
|
traceState._internalState.set(key, value);
|
|
3393
3397
|
return traceState;
|
|
3394
3398
|
};
|
|
3395
3399
|
TraceState.prototype.unset = function (key) {
|
|
3396
3400
|
var traceState = this._clone();
|
|
3397
|
-
traceState._internalState
|
|
3401
|
+
traceState._internalState["delete"](key);
|
|
3398
3402
|
return traceState;
|
|
3399
3403
|
};
|
|
3400
3404
|
TraceState.prototype.get = function (key) {
|
|
@@ -4212,7 +4216,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
|
|
|
4212
4216
|
return resolvedUrlBlueprinters;
|
|
4213
4217
|
}
|
|
4214
4218
|
|
|
4215
|
-
var SDK_VERSION = '2.
|
|
4219
|
+
var SDK_VERSION = '2.8.1';
|
|
4216
4220
|
|
|
4217
4221
|
function shouldDropEvent(cxRumEvent, options) {
|
|
4218
4222
|
if (isDocumentErrorWithoutMessage(cxRumEvent)) {
|
package/package.json
CHANGED
package/sessionRecorder.esm.js
CHANGED
|
@@ -80,6 +80,15 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
+
function _extends() {
|
|
84
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
85
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
86
|
+
var t = arguments[e];
|
|
87
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
88
|
+
}
|
|
89
|
+
return n;
|
|
90
|
+
}, _extends.apply(null, arguments);
|
|
91
|
+
}
|
|
83
92
|
function _toPrimitive(t, r) {
|
|
84
93
|
if ("object" != typeof t || !t) return t;
|
|
85
94
|
var e = t[Symbol.toPrimitive];
|
|
@@ -247,7 +256,7 @@ var Mirror = /*#__PURE__*/function () {
|
|
|
247
256
|
value: function removeNodeFromMap(n) {
|
|
248
257
|
var _this = this;
|
|
249
258
|
var id = this.getId(n);
|
|
250
|
-
this.idNodeMap
|
|
259
|
+
this.idNodeMap["delete"](id);
|
|
251
260
|
if (n.childNodes) {
|
|
252
261
|
n.childNodes.forEach(function (childNode) {
|
|
253
262
|
return _this.removeNodeFromMap(childNode);
|
|
@@ -889,7 +898,7 @@ function serializeElementNode(n, options) {
|
|
|
889
898
|
width = _n$getBoundingClientR.width,
|
|
890
899
|
height = _n$getBoundingClientR.height;
|
|
891
900
|
attributes2 = {
|
|
892
|
-
class: attributes2
|
|
901
|
+
"class": attributes2["class"],
|
|
893
902
|
rr_width: "".concat(width, "px"),
|
|
894
903
|
rr_height: "".concat(height, "px")
|
|
895
904
|
};
|
|
@@ -1026,7 +1035,7 @@ function serializeNodeWithId(n, options) {
|
|
|
1026
1035
|
} else {
|
|
1027
1036
|
id = genId();
|
|
1028
1037
|
}
|
|
1029
|
-
var serializedNode2 =
|
|
1038
|
+
var serializedNode2 = _extends(_serializedNode, {
|
|
1030
1039
|
id: id
|
|
1031
1040
|
});
|
|
1032
1041
|
mirror.add(n, serializedNode2);
|
package/src/constants.d.ts
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { CoralogixBrowserSdkConfig, InputType } from './types';
|
|
2
|
-
import {
|
|
3
|
-
import { CoralogixFetchInstrumentation } from './instrumentations/network/CoralogixFetchInstrumentation';
|
|
4
|
-
import { CoralogixXhrInstrumentation } from './instrumentations/network/CoralogixXhrInstrumentation';
|
|
5
|
-
import { CoralogixCustomLogInstrumentation } from './instrumentations/CoralogixCustomLogInstrumentation';
|
|
6
|
-
import { CoralogixWebVitalsInstrumentation } from './instrumentations/CoralogixWebVitalsInstrumentation';
|
|
7
|
-
import { CoralogixLongTaskInstrumentation } from './instrumentations/CoralogixLongTaskInstrumentation';
|
|
8
|
-
import { CoralogixResourcesInstrumentation } from './instrumentations/CoralogixResourcesInstrumentation';
|
|
9
|
-
import { CoralogixUserInteractionInstrumentation } from './instrumentations/user-interaction/CoralogixUserInteractionInstrumentation';
|
|
10
|
-
import { CoralogixMemoryUsageInstrumentation } from './instrumentations/memory-usage';
|
|
11
|
-
import { CoralogixScreenshotInstrumentation } from './instrumentations/screenshot/CoralogixScreenshotInstrumentation';
|
|
12
|
-
import { CoralogixCustomMeasurementInstrumentation } from './instrumentations/custom-measurements';
|
|
13
|
-
import { CoralogixInternalInstrumentation } from './instrumentations/CoralogixInternalInstrumentation';
|
|
14
|
-
import { CoralogixDOMInstrumentation } from './instrumentations/CoralogixDOMInstrumentation';
|
|
15
|
-
import { CoralogixWorkerInstrumentation } from './instrumentations/web-worker/CoralogixWorkerInstrumentation';
|
|
2
|
+
import { InternalInstrumentationConfig } from './instrumentations/instrumentation.model';
|
|
16
3
|
export declare const CORALOGIX_LOGS_URL_SUFFIX = "/browser/v1beta/logs";
|
|
17
4
|
export declare const CORALOGIX_RECORDING_URL_SUFFIX = "/sessionrecording";
|
|
18
5
|
export declare const MAX_EXPORT_BATCH_SIZE = 50;
|
|
@@ -31,63 +18,11 @@ export declare const MASKED_TEXT = "***";
|
|
|
31
18
|
export declare const MASK_CLASS_DEFAULT = "cx-mask";
|
|
32
19
|
export declare const MASK_INPUT_TYPES_DEFAULT: InputType[];
|
|
33
20
|
export declare const OPTIONS_DEFAULTS: Partial<CoralogixBrowserSdkConfig>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
readonly Instrument: typeof CoralogixFetchInstrumentation;
|
|
40
|
-
readonly confKey: "fetch";
|
|
41
|
-
readonly disable: false;
|
|
42
|
-
}, {
|
|
43
|
-
readonly Instrument: typeof CoralogixXhrInstrumentation;
|
|
44
|
-
readonly confKey: "xhr";
|
|
45
|
-
readonly disable: false;
|
|
46
|
-
}, {
|
|
47
|
-
readonly Instrument: typeof CoralogixCustomLogInstrumentation;
|
|
48
|
-
readonly confKey: "custom";
|
|
49
|
-
readonly disable: false;
|
|
50
|
-
}, {
|
|
51
|
-
readonly Instrument: typeof CoralogixUserInteractionInstrumentation;
|
|
52
|
-
readonly confKey: "user-interaction";
|
|
53
|
-
readonly disable: false;
|
|
54
|
-
}, {
|
|
55
|
-
readonly Instrument: typeof CoralogixWebVitalsInstrumentation;
|
|
56
|
-
readonly confKey: "web_vitals";
|
|
57
|
-
readonly disable: false;
|
|
58
|
-
}, {
|
|
59
|
-
readonly Instrument: typeof CoralogixLongTaskInstrumentation;
|
|
60
|
-
readonly confKey: "long_tasks";
|
|
61
|
-
readonly disable: false;
|
|
62
|
-
}, {
|
|
63
|
-
readonly Instrument: typeof CoralogixResourcesInstrumentation;
|
|
64
|
-
readonly confKey: "resources";
|
|
65
|
-
readonly disable: false;
|
|
66
|
-
}, {
|
|
67
|
-
readonly Instrument: typeof CoralogixInternalInstrumentation;
|
|
68
|
-
readonly confKey: "internal";
|
|
69
|
-
readonly disable: false;
|
|
70
|
-
}, {
|
|
71
|
-
readonly Instrument: typeof CoralogixDOMInstrumentation;
|
|
72
|
-
readonly confKey: "dom";
|
|
73
|
-
readonly disable: false;
|
|
74
|
-
}, {
|
|
75
|
-
readonly Instrument: typeof CoralogixCustomMeasurementInstrumentation;
|
|
76
|
-
readonly confKey: "custom_measurement";
|
|
77
|
-
readonly disable: false;
|
|
78
|
-
}, {
|
|
79
|
-
readonly Instrument: typeof CoralogixMemoryUsageInstrumentation;
|
|
80
|
-
readonly confKey: "memory_usage";
|
|
81
|
-
readonly disable: false;
|
|
82
|
-
}, {
|
|
83
|
-
readonly Instrument: typeof CoralogixScreenshotInstrumentation;
|
|
84
|
-
readonly confKey: "screenshot";
|
|
85
|
-
readonly disable: false;
|
|
86
|
-
}, {
|
|
87
|
-
readonly Instrument: typeof CoralogixWorkerInstrumentation;
|
|
88
|
-
readonly confKey: "web_worker";
|
|
89
|
-
readonly disable: false;
|
|
90
|
-
}];
|
|
21
|
+
/**
|
|
22
|
+
* Note: For any instrumentation added to CoralogixOtelWebOptionsInstrumentations,
|
|
23
|
+
* The `confKey` must match one of its keys.
|
|
24
|
+
*/
|
|
25
|
+
export declare const INSTRUMENTATIONS: readonly InternalInstrumentationConfig[];
|
|
91
26
|
export declare const CoralogixAttributes: {
|
|
92
27
|
USER_AGENT: string;
|
|
93
28
|
LOCATION_HREF: string;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { CUSTOM_MEASUREMENT_INSTRUMENTATION_NAME, DOM_INSTRUMENTATION_NAME, INTERNAL_INSTRUMENTATION_NAME, WORKER_INSTRUMENTATION } from './instrumentation.consts';
|
|
3
|
+
import { MEMORY_USAGE_INSTRUMENTATION_NAME } from './memory-usage';
|
|
4
|
+
import { SCREENSHOT_INSTRUMENTATION_NAME } from './screenshot/screenshot.utils';
|
|
5
|
+
import { CoralogixOtelWebOptionsInstrumentations } from '../types';
|
|
2
6
|
export interface CoralogixWebVitalsMetrics {
|
|
3
7
|
lcp: boolean;
|
|
4
8
|
fid: boolean;
|
|
@@ -28,3 +32,8 @@ export declare enum ResourceInitiatorTypes {
|
|
|
28
32
|
Track = "track",
|
|
29
33
|
Other = "other"
|
|
30
34
|
}
|
|
35
|
+
export type InternalInstrumentationConfig = {
|
|
36
|
+
Instrument: any;
|
|
37
|
+
confKey: keyof CoralogixOtelWebOptionsInstrumentations | typeof CUSTOM_MEASUREMENT_INSTRUMENTATION_NAME | typeof INTERNAL_INSTRUMENTATION_NAME | typeof DOM_INSTRUMENTATION_NAME | typeof MEMORY_USAGE_INSTRUMENTATION_NAME | typeof SCREENSHOT_INSTRUMENTATION_NAME | typeof WORKER_INSTRUMENTATION;
|
|
38
|
+
disable: boolean;
|
|
39
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InstrumentationBase, InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
2
|
import { EventName } from '../../types';
|
|
3
|
-
export declare const USER_INTERACTION_INSTRUMENTATION_NAME = "
|
|
3
|
+
export declare const USER_INTERACTION_INSTRUMENTATION_NAME = "interactions";
|
|
4
4
|
export declare const USER_INTERACTION_INSTRUMENTATION_VERSION = "1";
|
|
5
5
|
export type UserInteractionEventsConfig = Partial<Record<EventName, boolean>>;
|
|
6
6
|
export interface CoralogixUserInteractionInstrumentationConfig extends InstrumentationConfig {
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.8.1";
|