@coralogix/browser 1.0.91 → 1.0.93
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/README.md +46 -2
- package/package.json +1 -1
- package/src/session/sessionManager.js +0 -2
- package/src/session/sessionManager.js.map +1 -1
- package/src/version.d.ts +1 -1
- package/src/version.js +1 -1
- package/examples/Angular/app.component.d.ts +0 -24
- package/examples/Angular/app.component.js +0 -26
- package/examples/Angular/app.component.js.map +0 -1
- package/examples/NextJS/npm/initialize-coralogix-rum.d.ts +0 -15
- package/examples/NextJS/npm/initialize-coralogix-rum.js +0 -17
- package/examples/NextJS/npm/initialize-coralogix-rum.js.map +0 -1
package/README.md
CHANGED
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
JavaScript / TypeScript Frameworks: React, Angular, Vue, NextJS and more.<br>
|
|
11
11
|
Flutter (Currently only web).
|
|
12
12
|
|
|
13
|
-
See [examples](./examples).
|
|
14
|
-
|
|
15
13
|
## Usage
|
|
16
14
|
|
|
17
15
|
To use Coralogix SDK for Browsers, call `CoralogixRum.init(options)` at the soonest available moment after the page load.
|
|
@@ -163,6 +161,25 @@ CoralogixRum.init({
|
|
|
163
161
|
});
|
|
164
162
|
```
|
|
165
163
|
|
|
164
|
+
### instrumentations
|
|
165
|
+
Turn on/off specific instrumentations, defaults to all true.
|
|
166
|
+
|
|
167
|
+
```javascript
|
|
168
|
+
CoralogixRum.init({
|
|
169
|
+
// ...
|
|
170
|
+
instrumentations: {
|
|
171
|
+
xhr: true,
|
|
172
|
+
fetch: true,
|
|
173
|
+
web_vitals: false,
|
|
174
|
+
interactions: false,
|
|
175
|
+
custom: true,
|
|
176
|
+
errors: true,
|
|
177
|
+
long_tasks: true,
|
|
178
|
+
resources: false,
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
````
|
|
182
|
+
|
|
166
183
|
## CDN
|
|
167
184
|
|
|
168
185
|
Coralogix Browser SDK is also provided via CDN.
|
|
@@ -202,3 +219,30 @@ declare global {
|
|
|
202
219
|
}
|
|
203
220
|
```
|
|
204
221
|
|
|
222
|
+
## Flutter web
|
|
223
|
+
Coralogix Browser SDK is also provided for Flutter web.
|
|
224
|
+
|
|
225
|
+
Add the following CDN to your `index.html` file:
|
|
226
|
+
```javascript
|
|
227
|
+
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/latest/coralogix-browser-sdk.js"></script>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Then, in your Dart code, you can use the SDK as follows:
|
|
231
|
+
```dart
|
|
232
|
+
import 'package:flutter/material.dart';
|
|
233
|
+
import 'dart:js' as js;
|
|
234
|
+
|
|
235
|
+
void main() {
|
|
236
|
+
runApp(const MyApp());
|
|
237
|
+
|
|
238
|
+
var rum = js.JsObject.fromBrowserObject(js.context['CoralogixRum']);
|
|
239
|
+
|
|
240
|
+
rum.callMethod('init', [js.JsObject.jsify({
|
|
241
|
+
environment: 'test',
|
|
242
|
+
application: 'my-app',
|
|
243
|
+
version: '1.0.0',
|
|
244
|
+
public_key: 'my-key-123',
|
|
245
|
+
coralogixDomain: 'EU2',
|
|
246
|
+
})]);
|
|
247
|
+
}
|
|
248
|
+
```
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
3
3
|
import { miillisecondsInSecond, MILLISECONDS_PER_HOUR, SESSION_EXPIRATION_IN_HOURS, SESSION_IDLE_TIME_IN_MINUTES, SESSION_MANAGER_KEY, } from '../constants';
|
|
4
4
|
import { SessionRecorder } from './sessionRecorder';
|
|
5
5
|
import { getNowTime, getSdkConfig, getSessionRecorder } from '../helpers';
|
|
6
|
-
import { reportInternalEvent } from '../internal-event-reporter';
|
|
7
6
|
import { isSamplingOn } from '../utils';
|
|
8
7
|
import { PREV_SESSION_KEY, SESSION_KEY } from './session.consts';
|
|
9
8
|
export class SessionManager {
|
|
@@ -89,7 +88,6 @@ export class SessionManager {
|
|
|
89
88
|
window.sessionStorage.setItem(PREV_SESSION_KEY, JSON.stringify(this.activeSession));
|
|
90
89
|
(_a = this.sessionRecorder) === null || _a === void 0 ? void 0 : _a.stopRecording();
|
|
91
90
|
window.sessionStorage.removeItem(SESSION_KEY);
|
|
92
|
-
reportInternalEvent('session-end');
|
|
93
91
|
}
|
|
94
92
|
setSession(afterIdle = false, sessionId) {
|
|
95
93
|
var _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionManager.js","sourceRoot":"","sources":["../../../../../libs/browser/src/session/sessionManager.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"sessionManager.js","sourceRoot":"","sources":["../../../../../libs/browser/src/session/sessionManager.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,C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M,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,UAAU,CAAC,YAAqB,KAAK,EAAE,SAAkB;;QACvD,MAAM,GAAG,GAAW,UAAU,EAAE,CAAC;QAEjC,MAAM,cAAc,GAClB,GAAG,GAAG,qBAAqB,GAAG,2BAA2B,CAAC;QAE5D,MAAM,OAAO,GAAY;YACvB,SAAS,EAAE,SAAS,IAAI,MAAM,EAAE;YAChC,mBAAmB,EAAE,GAAG;YACxB,qBAAqB,EAAE,cAAc;SACtC,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;QAE7B,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAEpE,MAAM,eAAe,GAAoB,kBAAkB,EAAE,CAAC;QAC9D,MAAM,6BAA6B,GACjC,SAAS;YACT,CAAC,CAAC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,yBAAyB,CAAA;YAC5C,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,qBAAqB,0CAAE,MAAM,CAAA,CAAC;QAEvC,IACE,6BAA6B;aAC7B,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,uBAAuB,EAAE,CAAA,EAC1C;YACA,MAAA,IAAI,CAAC,eAAe,0CAAE,cAAc,EAAE,CAAC;SACxC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
package/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.93";
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = '1.0.
|
|
1
|
+
export const SDK_VERSION = '1.0.93';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
import { Component, OnInit } from '@angular/core';
|
|
4
|
-
import { CoralogixRum } from '@coralogix/browser';
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-root',
|
|
7
|
-
templateUrl: './app.component.html',
|
|
8
|
-
styleUrls: ['./app.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class AppComponent implements OnInit {
|
|
11
|
-
title = 'demo-angular';
|
|
12
|
-
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
CoralogixRum.init({
|
|
15
|
-
environment: 'test',
|
|
16
|
-
application: 'my-app',
|
|
17
|
-
version: '1.0.0',
|
|
18
|
-
public_key: 'my-key-123',
|
|
19
|
-
coralogixDomain: 'EU2',
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
**/
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
import { Component, OnInit } from '@angular/core';
|
|
5
|
-
import { CoralogixRum } from '@coralogix/browser';
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-root',
|
|
8
|
-
templateUrl: './app.component.html',
|
|
9
|
-
styleUrls: ['./app.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class AppComponent implements OnInit {
|
|
12
|
-
title = 'demo-angular';
|
|
13
|
-
|
|
14
|
-
ngOnInit() {
|
|
15
|
-
CoralogixRum.init({
|
|
16
|
-
environment: 'test',
|
|
17
|
-
application: 'my-app',
|
|
18
|
-
version: '1.0.0',
|
|
19
|
-
public_key: 'my-key-123',
|
|
20
|
-
coralogixDomain: 'EU2',
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
**/
|
|
26
|
-
//# sourceMappingURL=app.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.component.js","sourceRoot":"","sources":["../../../../../libs/browser/examples/Angular/app.component.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;IAuBI"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
export const initializeCoralogixRUM = async () => {
|
|
4
|
-
const { CoralogixRum } = await import('@coralogix/browser');
|
|
5
|
-
|
|
6
|
-
CoralogixRum.init({
|
|
7
|
-
environment: 'test',
|
|
8
|
-
application: 'my-app',
|
|
9
|
-
version: '1.0.0',
|
|
10
|
-
public_key: 'my-key-123',
|
|
11
|
-
coralogixDomain: 'EU2',
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
**/
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
export const initializeCoralogixRUM = async () => {
|
|
5
|
-
const { CoralogixRum } = await import('@coralogix/browser');
|
|
6
|
-
|
|
7
|
-
CoralogixRum.init({
|
|
8
|
-
environment: 'test',
|
|
9
|
-
application: 'my-app',
|
|
10
|
-
version: '1.0.0',
|
|
11
|
-
public_key: 'my-key-123',
|
|
12
|
-
coralogixDomain: 'EU2',
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
**/
|
|
17
|
-
//# sourceMappingURL=initialize-coralogix-rum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initialize-coralogix-rum.js","sourceRoot":"","sources":["../../../../../../libs/browser/examples/NextJS/npm/initialize-coralogix-rum.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;IAcI"}
|