Skip to content

fortune-cook1e/client-monitor

Repository files navigation

client-monitor

cookie-client-monitor client-side javascript exception and tracing library.

  • Collect performance metrics and error to your custom api

Usage

Install

npm install cookie-client-monitor --save
or yarn add cookie-client-monitor
or pnpm add cookie-client-monitor

Quick Start

import monitor from 'cookie-client-monitor'

Register

monitor.register({
  url:'http://www.backend.com/api', // backend api for collecting metrics
  spa:true, // 
  fmp:true, // Collect FMP (first meaningful paint) data of the first screen
  errors:{
    js:true,
    ajax:true,
    resource:true,
    promise:true
  },
  report:{
    performance:true,
    error:{
      js:true,
      ajax:true,
      resource:true,
      promise:true
    }
  },
  handleError:true
})

Check example

npm run dev

About

Client-side Javascirpt tracing library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published