ta-monitor
v0.3.1
Published
Front end analytics and error monitoring tool
Downloads
10
Readme
TA Monitor
Usage
First, install the npm package with your favorite tool. We recommend yarn.
yarn add ta-monitor
Next, import and instantiate the base class.
import TAMonitor from 'ta-monitor'
const monitor = new TAMonitor()
export default monitor
This instance is what you should use to log events across your application. To wire these events up to external API's, you can subscribe to the monitor instance to take action on events as they are emitted.
Reporters
import TAMonitor from 'ta-monitor'
import consoleReporter from 'ta-monitor/lib/reporters/console'
import sentryReporter from 'ta-monitor/lib/reporters/sentry'
const monitor = new TAMonitor()
monitor.subscribe(consoleReporter())
monitor.subscribe(sentryReporter('your-api-key-here'))
export default monitor