@kubesense/kubesense-browser-rum 1.0.0 → 1.2.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/README.md
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Kubesense Browser RUM
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Kubesense Real User Monitoring (RUM) lets you visualize and analyze the real-time
|
|
4
|
+
performance and user journeys of your application's individual users — page views,
|
|
5
|
+
user actions, resources, errors, long tasks, and Core Web Vitals — together with
|
|
6
|
+
optional **Session Replay** and **Profiling**.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
This is the full-featured RUM SDK. If you don't need Session Replay or Profiling,
|
|
9
|
+
use the smaller [`@kubesense/kubesense-browser-rum-slim`][rum-slim] instead.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @kubesense/kubesense-browser-rum
|
|
15
|
+
# or
|
|
16
|
+
yarn add @kubesense/kubesense-browser-rum
|
|
17
|
+
```
|
|
6
18
|
|
|
7
19
|
## Usage
|
|
8
20
|
|
|
9
|
-
|
|
21
|
+
Initialize the SDK as early as possible in your application's lifecycle:
|
|
10
22
|
|
|
11
23
|
```javascript
|
|
12
24
|
import { kubesenseSdk } from '@kubesense/kubesense-browser-rum'
|
|
13
25
|
|
|
14
26
|
kubesenseSdk.init({
|
|
15
|
-
applicationId: '<
|
|
16
|
-
clientToken: '<
|
|
17
|
-
site: '<
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
27
|
+
applicationId: '<KUBESENSE_APPLICATION_ID>',
|
|
28
|
+
clientToken: '<KUBESENSE_CLIENT_TOKEN>',
|
|
29
|
+
site: '<KUBESENSE_SITE>',
|
|
30
|
+
// service: 'my-web-application',
|
|
31
|
+
// env: 'production',
|
|
32
|
+
// version: '1.0.0',
|
|
21
33
|
sessionSampleRate: 100,
|
|
22
34
|
sessionReplaySampleRate: 100,
|
|
23
35
|
trackResources: true,
|
|
@@ -26,9 +38,32 @@ kubesenseSdk.init({
|
|
|
26
38
|
})
|
|
27
39
|
```
|
|
28
40
|
|
|
29
|
-
**Note
|
|
41
|
+
> **Note:** `trackUserInteractions` enables automatic collection of user clicks.
|
|
42
|
+
> **Sensitive or private data** contained in your pages may be used to identify
|
|
43
|
+
> the elements interacted with. See the privacy options in the integration guide.
|
|
44
|
+
|
|
45
|
+
### Sending custom events
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
// Custom user action
|
|
49
|
+
kubesenseSdk.addAction('checkout', { cartValue: 42 })
|
|
50
|
+
|
|
51
|
+
// Custom error
|
|
52
|
+
kubesenseSdk.addError(new Error('Something went wrong'), { source: 'checkout' })
|
|
53
|
+
|
|
54
|
+
// Identify the current user
|
|
55
|
+
kubesenseSdk.setUser({ id: 'u-123', name: 'Jane Doe', email: 'jane@example.com' })
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Documentation
|
|
59
|
+
|
|
60
|
+
The full API — configuration reference, view/action/error tracking, Session
|
|
61
|
+
Replay, distributed tracing, privacy & consent, feature flags, and more — is
|
|
62
|
+
documented in the [Browser RUM Integration Guide][guide].
|
|
63
|
+
|
|
64
|
+
## License
|
|
30
65
|
|
|
31
|
-
|
|
66
|
+
[Apache-2.0](https://github.com/kubesense-ai/kubesense-browser-sdk/blob/main/LICENSE)
|
|
32
67
|
|
|
33
|
-
[
|
|
34
|
-
[
|
|
68
|
+
[rum-slim]: https://www.npmjs.com/package/@kubesense/kubesense-browser-rum-slim
|
|
69
|
+
[guide]: https://github.com/kubesense-ai/kubesense-browser-sdk/blob/main/docs/browser-rum-integration.md
|