Giter Club home page Giter Club logo

femonitor's Introduction

FEMonitor 前端监控SDK

  • 错误上报
    • 页面报错
    • 页面资源报错
    • ajax报错
    • js报错
    • fetch报错
    • promise报错
  • 用户行为监控
    • 用户点击
    • 用户操作记录
  • 页面性能监控
    • whiteScreenTime
    • tcpTime
    • requestTime
    • dnsTime
    • parseDOMTime
    • firstRenderTime
    • onloadTime
    • readyTime
  • PV、UV

调试

# 安装外部依赖
npm i
# 安装调试项目依赖
cd vue-demo
npm i

# 运行调试项目
npm run dev

# 运行后端服务
npm run server

# 打包
npm run build

用法

  • Vue项目
import FEMonitor from 'femonitor'

Vue.use(FEMonitor, {
  reportUrl: '',
  token: ''
})
  • 非Vue项目
import FEMonitor from 'femonitor'

FEMonitor.init({
  reportUrl: '',
  token: ''
})

目录结构

├── README.md
├── base.drawio
├── config 配置文件
│   └── index.js
├── index.js sdk 入口文件
├── interface
├── lib 热力图库文件(无用)
│   └── heatmap.js
├── node_modules
├── package-lock.json
├── package.json
├── server 后端代码
│   ├── controllers
│   ├── data 接口上报的数据存储目录
│   ├── index.js 入口文件
│   ├── routes 接口路由文件
│   └── sourcemap 前端上传的sourcemap存储目录
├── utils 公共参数
│   └── index.js
└── vue-demo 前端demo项目
    ├── README.md
    ├── babel.config.js
    ├── build
    ├── dist
    ├── jsconfig.json
    ├── node_modules
    ├── package-lock.json
    ├── package.json
    ├── public
    ├── src
    └── vue.config.js

在项目中调用测试

npm i

npm run server
import FEMonitor from 'femonitor'

FEMonitor.init({
  reportUrl: 'http://localhost:3000/report',
  token: '123'
})

femonitor's People

Contributors

403notfound avatar

Stargazers

duoduo0807 avatar  avatar

Watchers

 avatar

Forkers

1437807836

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.