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.
Files changed (2) hide show
  1. package/README.md +15 -17
  2. 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
- apiEndpoint: 'https://your-api.com/collect',
33
- appName: 'MyApp',
34
- environment: 'production'
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
- - `apiEndpoint`: URL where monitoring data will be sent
43
- - `appName`: Name of your application
44
- - `environment`: Environment (development, staging, production)
45
- - `sampleRate`: Sampling rate for data collection (0-1)
46
- - `enableErrorTracking`: Enable/disable error monitoring (default: true)
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
- apiEndpoint: 'https://analytics.myapp.com/events',
57
- appName: 'E-commerce App',
58
- environment: 'production',
59
- sampleRate: 1.0,
60
- enableErrorTracking: true,
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reporting-lib",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A comprehensive monitoring and reporting library for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",