1.0.0 • Published 1 year ago

performance-sentry v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

performance-sentry (performance-sentry_v1.0.0-green)

Npm 版本

📖 简介

  • 欢迎使用performance-sentry脚手架工具,该工具可以帮助前端监控。
  • 支持Vue框架
  • 支持React框架
  • 支持移动端项目
  • 支持PC端项目
  • 原生js
  • 里面有前端监控SDK

    1.性能监控(FP FCP, LCP onload DomContentLoaded) 2.上报方法(xhr,sendBeacon,image gif) 3.上报时机(requestidleCallback,setTimeout,beforeUnload,批量上报) 4.监控错误(资源加载错误,js错误,promise async await错误) 5.行为监控(PV,UV,页面停留时间,用户行为 click)

📦 安装

npm install performance-sentry

🚩 使用

# 下载包
npm install performance-sentry

# 在vue项目中使用
在main.js导入即可
import monitor from "performance-sentry";
app.use(monitor, {
  url: "",  // 数据上报地址
});

# 在react项目中使用
在index.js导入即可
import monitor from "performance-sentry";
ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById("root")
);
monitor.init({
  url: "",  // 数据上报地址
});
1.0.0

1 year ago