reporting-lib 0.1.0 → 0.1.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/README.md +15 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,9 +29,11 @@ import monitor from 'reporting-lib';
|
|
|
29
29
|
// Initialize the monitoring system
|
|
30
30
|
monitor.init({
|
|
31
31
|
// Your configuration options here
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
reportUrl: 'https://your-api.com/collect',
|
|
33
|
+
source: 'web',
|
|
34
|
+
userId: 'user123',
|
|
35
|
+
trackerAll: true,
|
|
36
|
+
version: '1.0.0'
|
|
35
37
|
});
|
|
36
38
|
```
|
|
37
39
|
|
|
@@ -39,13 +41,11 @@ monitor.init({
|
|
|
39
41
|
|
|
40
42
|
The `init` method accepts the following configuration options:
|
|
41
43
|
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `enablePerformanceTracking`: Enable/disable performance monitoring (default: true)
|
|
48
|
-
- `enableApiTracking`: Enable/disable API monitoring (default: true)
|
|
44
|
+
- `reportUrl`: URL where monitoring data will be sent (default: 'http://localhost:3001/report/actions')
|
|
45
|
+
- `source`: Platform identifier (default: 'mbp')
|
|
46
|
+
- `userId`: User identifier (default: '')
|
|
47
|
+
- `trackerAll`: Whether to enable full tracking (default: false)
|
|
48
|
+
- `version`: Version string for the application (optional)
|
|
49
49
|
|
|
50
50
|
### Example
|
|
51
51
|
|
|
@@ -53,13 +53,11 @@ The `init` method accepts the following configuration options:
|
|
|
53
53
|
import monitor from 'reporting-lib';
|
|
54
54
|
|
|
55
55
|
monitor.init({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
enablePerformanceTracking: true,
|
|
62
|
-
enableApiTracking: true
|
|
56
|
+
reportUrl: 'https://analytics.myapp.com/events',
|
|
57
|
+
source: 'web',
|
|
58
|
+
userId: 'user123',
|
|
59
|
+
trackerAll: true,
|
|
60
|
+
version: '1.0.0'
|
|
63
61
|
});
|
|
64
62
|
```
|
|
65
63
|
|