1.0.2 • Published 4 years ago

micro-trackjs v1.0.2

Weekly downloads
73
License
MIT
Repository
github
Last release
4 years ago

micro-trackjs

micro-trackjs allows you to send micro errors to TrackJS.

This little library was inspired it's "siblings" here:

https://github.com/amio/awesome-micro#loggers-errors--reporting

Usage

npm i micro-trackjs

Basic Example

const trackjs = require("micro-trackjs");
const token = "your trackjs app token";

module.exports = trackjs(token)(async (req, res) => {
  throw Error("hello micro-trackjs");
});

Example with options

See docs for full options:
https://docs.trackjs.com/node-agent/sdk-reference/agent-options/

const trackjs = require("micro-trackjs");
const token = "your trackjs app token";

module.exports = trackjs(key, { application: "my-application" })(
  async (req, res) => {
    throw Error("hellow micro-trackjs");
  }
);

Development

git clone git@github.com:pauldariye/micro-trackjs.git
cd micro-trackjs && yarn # or npm install
yarn test

Acknowledgements

License

MIT