@coralogix/browser 3.15.1 → 3.16.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 +50 -23
- package/index.esm2.js +8 -3
- package/package.json +1 -1
- package/src/Request.d.ts +1 -0
- package/src/types.d.ts +1 -0
- package/src/version.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -22,46 +22,60 @@
|
|
|
22
22
|
- [Worker URL](#worker-url)
|
|
23
23
|
- [Screenshots](#screenshots)
|
|
24
24
|
|
|
25
|
-
10. [
|
|
26
|
-
11. [
|
|
27
|
-
12. [
|
|
28
|
-
13. [Ignore
|
|
29
|
-
14. [
|
|
30
|
-
15. [
|
|
31
|
-
16. [
|
|
32
|
-
17. [
|
|
33
|
-
18. [
|
|
25
|
+
10. [Unique Users](#unique-users)
|
|
26
|
+
11. [Network Extra Configuration](#network-extra-configuration)
|
|
27
|
+
12. [Multi Page Application](#multi-page-application)
|
|
28
|
+
13. [Ignore Errors](#ignore-errors)
|
|
29
|
+
14. [Ignore URLs](#ignore-urls)
|
|
30
|
+
15. [Stack Trace Limit](#stack-trace-limit)
|
|
31
|
+
16. [Mask Elements](#mask-elements)
|
|
32
|
+
17. [Custom Action Names](#custom-action-names)
|
|
33
|
+
18. [Label Providers](#label-providers)
|
|
34
|
+
19. [URL Blueprinters](#url-blueprinters)
|
|
35
|
+
20. [Traces](#traces)
|
|
34
36
|
|
|
35
37
|
- [Propagate Trace Header for CORS URLs](#propagatetraceheadercorsurls)
|
|
36
38
|
- [Allowed Tracing URLs](#allowedtracingurls)
|
|
37
39
|
- [Extra Propagators (B3 / AWS X-Ray)](#b3--aws-x-ray-propagation)
|
|
40
|
+
- [Custom Propagation](#custom-propagation)
|
|
41
|
+
- [Traces Exporter](#traces-exporter)
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
21. [Before Send](#before-send)
|
|
44
|
+
22. [Proxy URL](#proxy-url)
|
|
45
|
+
|
|
46
|
+
- [ignoreProxyUrlParams](#ignoreproxyurlparams)
|
|
47
|
+
|
|
48
|
+
23. [Collect IP Data](#collect-ip-data)
|
|
49
|
+
24. [SDK Fetch Priority](#sdk-fetch-priority)
|
|
50
|
+
25. [Custom Measurement](#custom-measurement)
|
|
51
|
+
26. [Add Timing](#add-timing)
|
|
52
|
+
27. [Custom Time Measurement](#custom-time-measurement)
|
|
53
|
+
28. [Microfrontend Support](#microfrontend-support)
|
|
46
54
|
|
|
47
55
|
- [Pre Requisites](#pre-requisites)
|
|
48
56
|
|
|
49
|
-
|
|
57
|
+
29. [Custom Spans](#custom-spans)
|
|
50
58
|
|
|
51
59
|
- [Ignored Instruments](#ignored-instruments)
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
30. [Soft Navigations (Experimental)](#soft-navigations--experimental)
|
|
62
|
+
31. [Memory Usage (Experimental)](#memory-usage---experimental)
|
|
63
|
+
32. [Web Worker Support](#web-worker-support)
|
|
64
|
+
|
|
65
|
+
- [Enabling Web Worker Support](#enabling-web-worker-support)
|
|
66
|
+
- [Examples](#examples)
|
|
67
|
+
|
|
68
|
+
33. [Angular Zone.js Configuration](#angular-zonejs-configuration)
|
|
69
|
+
34. [CDN](#cdn)
|
|
57
70
|
|
|
58
71
|
- [Specific Version](#specific-version-recommended)
|
|
72
|
+
- [ES5](#es5)
|
|
59
73
|
- [Add the CDN Script to Your Application](#add-the-cdn-script-to-your-application)
|
|
60
74
|
- [Initialization](#initialization)
|
|
61
75
|
- [Via JS File](#via-js-file)
|
|
62
76
|
- [Via TS File](#via-ts-file)
|
|
63
77
|
|
|
64
|
-
|
|
78
|
+
35. [Flutter Web](#flutter-web)
|
|
65
79
|
|
|
66
80
|
---
|
|
67
81
|
|
|
@@ -559,7 +573,7 @@ Examples of masked elements:
|
|
|
559
573
|
|
|
560
574
|
```
|
|
561
575
|
|
|
562
|
-
### Action
|
|
576
|
+
### Custom Action Names
|
|
563
577
|
|
|
564
578
|
The SDK uses various strategies to name click actions. For more control, define a `data-cx-action-name` attribute on clickable elements (or any of their parents) to set the action name.
|
|
565
579
|
|
|
@@ -854,6 +868,19 @@ CoralogixRum.init({
|
|
|
854
868
|
});
|
|
855
869
|
```
|
|
856
870
|
|
|
871
|
+
### SDK Fetch Priority
|
|
872
|
+
|
|
873
|
+
Controls the [`priority`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#priority) hint applied to the SDK's own network requests — the internal calls it makes to send logs and recordings to Coralogix. This is unrelated to your application's requests. When omitted, the browser uses its default (Chromium treats this as `high`), which can cause SDK traffic to compete with your application's critical requests. Set `sdkFetchPriority: 'low'` to deprioritize SDK traffic.
|
|
874
|
+
|
|
875
|
+
Accepted values: `'low'`, `'high'`, or `'auto'` (default).
|
|
876
|
+
|
|
877
|
+
```javascript
|
|
878
|
+
CoralogixRum.init({
|
|
879
|
+
// ...
|
|
880
|
+
sdkFetchPriority: 'low',
|
|
881
|
+
});
|
|
882
|
+
```
|
|
883
|
+
|
|
857
884
|
### Custom Measurement
|
|
858
885
|
|
|
859
886
|
Custom measurement allows you to send numeric data to Coralogix for precise monitoring and analysis.
|
package/index.esm2.js
CHANGED
|
@@ -2147,7 +2147,7 @@ var DATA_TESTID_ATTRIBUTE = 'data-testid';
|
|
|
2147
2147
|
var DATA_TEST_ID_ATTRIBUTE = 'data-test-id';
|
|
2148
2148
|
|
|
2149
2149
|
var PARENT_SEARCH_DEPTH = 5;
|
|
2150
|
-
var CLICKABLE_ELEMENTS = ['BUTTON', 'LABEL', 'A', 'INPUT', 'OPTION'];
|
|
2150
|
+
var CLICKABLE_ELEMENTS = ['BUTTON', 'LABEL', 'A', 'INPUT', 'OPTION', 'LI'];
|
|
2151
2151
|
function getAttributeFromAncestors(element, attr, depth) {
|
|
2152
2152
|
if (depth === void 0) { depth = PARENT_SEARCH_DEPTH; }
|
|
2153
2153
|
if (!element || depth <= 0)
|
|
@@ -3759,6 +3759,7 @@ var Request = (function () {
|
|
|
3759
3759
|
this.requestConfig = requestConfig;
|
|
3760
3760
|
this.resolvedUrl = '';
|
|
3761
3761
|
this.resolvedHeaders = {};
|
|
3762
|
+
this.fetchPriority = 'auto';
|
|
3762
3763
|
this.init();
|
|
3763
3764
|
}
|
|
3764
3765
|
Request.prototype.getResolvedUrl = function (config) {
|
|
@@ -3771,7 +3772,7 @@ var Request = (function () {
|
|
|
3771
3772
|
return "".concat(proxyUrl, "?").concat(PROXY_CX_FORWARD_PARAMETER, "=").concat(encodeURIComponent(cxEndpoint));
|
|
3772
3773
|
};
|
|
3773
3774
|
Request.prototype.init = function () {
|
|
3774
|
-
var _a = getSdkConfig(), proxyUrl = _a.proxyUrl, ignoreProxyUrlParams = _a.ignoreProxyUrlParams, coralogixDomain = _a.coralogixDomain, public_key = _a.public_key;
|
|
3775
|
+
var _a = getSdkConfig(), proxyUrl = _a.proxyUrl, ignoreProxyUrlParams = _a.ignoreProxyUrlParams, coralogixDomain = _a.coralogixDomain, public_key = _a.public_key, sdkFetchPriority = _a.sdkFetchPriority;
|
|
3775
3776
|
var headers = this.requestConfig.headers;
|
|
3776
3777
|
this.resolvedUrl = this.getResolvedUrl({
|
|
3777
3778
|
proxyUrl: proxyUrl,
|
|
@@ -3782,6 +3783,9 @@ var Request = (function () {
|
|
|
3782
3783
|
headers['Authorization'] = "Bearer ".concat(public_key);
|
|
3783
3784
|
}
|
|
3784
3785
|
this.resolvedHeaders = headers;
|
|
3786
|
+
if (sdkFetchPriority) {
|
|
3787
|
+
this.fetchPriority = sdkFetchPriority;
|
|
3788
|
+
}
|
|
3785
3789
|
};
|
|
3786
3790
|
Request.prototype.send = function (body) {
|
|
3787
3791
|
var useKeepalive = document.hidden && this.isWithinKeepaliveQuota(body);
|
|
@@ -3790,6 +3794,7 @@ var Request = (function () {
|
|
|
3790
3794
|
headers: this.resolvedHeaders,
|
|
3791
3795
|
body: body,
|
|
3792
3796
|
keepalive: useKeepalive,
|
|
3797
|
+
priority: this.fetchPriority,
|
|
3793
3798
|
}).catch(function (e) {
|
|
3794
3799
|
return e;
|
|
3795
3800
|
});
|
|
@@ -4707,7 +4712,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
|
|
|
4707
4712
|
return resolvedUrlBlueprinters;
|
|
4708
4713
|
}
|
|
4709
4714
|
|
|
4710
|
-
var SDK_VERSION = '3.
|
|
4715
|
+
var SDK_VERSION = '3.16.0';
|
|
4711
4716
|
|
|
4712
4717
|
function shouldDropEvent(cxRumEvent, options) {
|
|
4713
4718
|
if (isDocumentErrorWithoutMessage(cxRumEvent)) {
|
package/package.json
CHANGED
package/src/Request.d.ts
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -164,6 +164,7 @@ export interface CoralogixBrowserSdkConfig {
|
|
|
164
164
|
workerSupport?: boolean;
|
|
165
165
|
tracesExporter?: (data: TraceExporterData) => void;
|
|
166
166
|
runOutsideAngularZone?: boolean;
|
|
167
|
+
sdkFetchPriority?: RequestPriority;
|
|
167
168
|
}
|
|
168
169
|
export interface CoralogixOtelWebType extends SendLog {
|
|
169
170
|
init: (options: CoralogixBrowserSdkConfig) => void;
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.
|
|
1
|
+
export declare const SDK_VERSION = "3.16.0";
|