femonitor-web
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "femonitor-web", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A web SDK for frontend error and performance monnitor", | ||
@@ -8,2 +8,6 @@ "author": { | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/alex1504/femonitor-web" | ||
}, | ||
"license": "MIT", | ||
@@ -10,0 +14,0 @@ "main": "dist/index.umd.js", |
# Description | ||
A SDK for web error and performance monitor using event subscription | ||
A sdk for web error and performance monitor. | ||
# Feature | ||
- [x] Error observe, includes js error, unhandle rejection error, http error and resource error | ||
- [x] Error sampling, support errors collection emit events for report optimization | ||
- [x] Observe page performance | ||
- [x] Observe user behaviors, includes console, user click event | ||
- [x] Integrate rrweb | ||
- [x] Hack spa router change | ||
- [x] Auto report | ||
@@ -28,5 +36,5 @@ # Development | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/femonitor-web@latest/dist/index.min.js"></script> | ||
``` | ||
<script src="https://cdn.jsdelivr.net/npm/femonitor-web@latest/bin/femonitor-web.min.js"></script> | ||
``` | ||
@@ -43,6 +51,9 @@ ## NPM | ||
```javascript | ||
```js | ||
import { WebMonitor } from "femonitor-web"; | ||
const monitor = Monitor.init(); | ||
monitor.on([event], () => {}); | ||
/* Listen single event */ | ||
monitor.on([event], (emitData) => {}); | ||
/* Or Listen all event */ | ||
monitor.on("event", (eventName, emitData) => {}) | ||
``` | ||
@@ -52,5 +63,5 @@ | ||
``` | ||
```typescript | ||
// Default full options | ||
const defaultTrackerOptions = { | ||
export const defaultTrackerOptions = { | ||
env: 'dev', | ||
@@ -102,3 +113,3 @@ reportUrl: "", | ||
``` | ||
```js | ||
class ErrorBoundary extends React.Component { | ||
@@ -137,1 +148,3 @@ constructor(props) { | ||
| performanceInfoReady | Performance data is ready | | ||
| event | Includes all events above | | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1448082
146
0
3