ta-monitor

0.3.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i ta-monitor

Weekly Downloads

0

Version

0.3.1

License

MIT

Last publish

Collaborators

  • deltazulu
  • deweybot