@coralogix/browser 2.2.0 β 2.4.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 +14 -1
- package/README.md +36 -9
- package/index.esm.js +12 -6695
- package/index.esm2.js +5054 -0
- package/package.json +1 -1
- package/sessionRecorder.esm.js +1685 -0
- package/src/instrumentations/CoralogixCustomLogInstrumentation.d.ts +9 -1
- package/src/types.d.ts +7 -7
- package/src/version.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
|
+
## 2.4.0 (2025-04-08)
|
|
2
|
+
|
|
3
|
+
### π Features
|
|
4
|
+
|
|
5
|
+
- Allow passing labels to Custom logs (log, warn, debug, etc...) API.
|
|
6
|
+
|
|
7
|
+
## 2.3.0 (2025-04-01)
|
|
8
|
+
|
|
9
|
+
### π Features
|
|
10
|
+
|
|
11
|
+
- Lazy load session recorder<br>
|
|
12
|
+
To improve initial load time and reduce JavaScript bundle size, the session recorder is dynamically imported only when itβs needed (e.g., when session recording is enabled by config and sampling).
|
|
13
|
+
|
|
1
14
|
## 2.2.0 (2025-03-18)
|
|
2
15
|
|
|
3
16
|
### π Features
|
|
4
17
|
|
|
5
|
-
-
|
|
18
|
+
- Improved Performance Observer compatibility.
|
|
6
19
|
|
|
7
20
|
## 2.1.0 (2025-02-18)
|
|
8
21
|
|
package/README.md
CHANGED
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
28. [CDN](#cdn)
|
|
55
55
|
|
|
56
56
|
- [Specific Version](#specific-version-recommended)
|
|
57
|
-
- [Latest Version](#latest-version)
|
|
58
57
|
- [Add the CDN Script to Your Application](#add-the-cdn-script-to-your-application)
|
|
59
58
|
- [Initialization](#initialization)
|
|
60
59
|
- [Via JS File](#via-js-file)
|
|
@@ -196,11 +195,30 @@ CoralogixRum.init({
|
|
|
196
195
|
```javascript
|
|
197
196
|
import { CoralogixRum, CoralogixLogSeverity } from '@coralogix/browser';
|
|
198
197
|
|
|
198
|
+
// send custom logs with different severity levels
|
|
199
199
|
CoralogixRum.log(CoralogixLogSeverity.Info, 'this is a custom log');
|
|
200
200
|
|
|
201
|
+
// send custom logs with extra data
|
|
201
202
|
CoralogixRum.log(CoralogixLogSeverity.Error, 'this is an error custom log with extra data', { data: 'tbd' });
|
|
202
203
|
|
|
204
|
+
// send custom logs with extra data, call the error severity log directly
|
|
203
205
|
CoralogixRum.error('this is a custom log with error severity', { data: 'tbd' });
|
|
206
|
+
|
|
207
|
+
// send custom logs with extra data and labels
|
|
208
|
+
CoralogixRum.warning(
|
|
209
|
+
'this is a custom log message with warning severity',
|
|
210
|
+
{
|
|
211
|
+
data: 'tbd',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
my_label_key: 'my label value',
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
// data is optional unless labels are provided, in which case data is required (can be null
|
|
219
|
+
CoralogixRum.log(CoralogixLogSeverity.Info, 'this is a custom log message with info severity', null, {
|
|
220
|
+
my_label_key: 'my label value',
|
|
221
|
+
});
|
|
204
222
|
```
|
|
205
223
|
|
|
206
224
|
### Instrumentation's
|
|
@@ -303,6 +321,19 @@ Example:
|
|
|
303
321
|
| .rr-ignore | An element with the class name .rr-ignore will not record its input events |
|
|
304
322
|
| .rr-mask | All text of elements and their children will be masked. |
|
|
305
323
|
|
|
324
|
+
If you want to mask all of your inputs and texts in the session, you can use the following configuration:
|
|
325
|
+
|
|
326
|
+
```javascript
|
|
327
|
+
CoralogixRum.init({
|
|
328
|
+
// ...
|
|
329
|
+
sessionRecordingConfig: {
|
|
330
|
+
// ...
|
|
331
|
+
maskAllInputs: true,
|
|
332
|
+
maskTextSelector: '*',
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
```
|
|
336
|
+
|
|
306
337
|
#### Performance
|
|
307
338
|
|
|
308
339
|
Session Recording works by recording incremental DOM changes that occur in your web application.
|
|
@@ -818,18 +849,14 @@ You can choose your desired version.
|
|
|
818
849
|
https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js \
|
|
819
850
|
Replace [version] with a version from [Releases page](https://www.npmjs.com/package/@coralogix/browser?activeTab=versions).
|
|
820
851
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
> _**Note: CDN latest has been deprecated, please use an explicit version instead.**_
|
|
824
|
-
|
|
825
|
-
https://cdn.rum-ingress-coralogix.com/coralogix/browser/latest/coralogix-browser-sdk.js
|
|
852
|
+
> _**Note: CDN latest has no longer maintained, please use an explicit version instead.**_
|
|
826
853
|
|
|
827
854
|
### Add the CDN script to your application
|
|
828
855
|
|
|
829
856
|
```javascript
|
|
830
857
|
<head>
|
|
831
858
|
...
|
|
832
|
-
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/
|
|
859
|
+
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js"></script>
|
|
833
860
|
</head>
|
|
834
861
|
```
|
|
835
862
|
|
|
@@ -849,7 +876,7 @@ window.CoralogixRum.init(...);
|
|
|
849
876
|
// In case of warning from TSC
|
|
850
877
|
declare global {
|
|
851
878
|
interface Window {
|
|
852
|
-
CoralogixRum:
|
|
879
|
+
CoralogixRum: CoralogixOtelWebType;
|
|
853
880
|
}
|
|
854
881
|
}
|
|
855
882
|
```
|
|
@@ -861,7 +888,7 @@ Coralogix Browser SDK is also provided for Flutter web.
|
|
|
861
888
|
Add the following CDN to your `index.html` file:
|
|
862
889
|
|
|
863
890
|
```javascript
|
|
864
|
-
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/
|
|
891
|
+
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js"></script>
|
|
865
892
|
```
|
|
866
893
|
|
|
867
894
|
Then, in your Dart code, you can use the SDK as follows:
|