egg-tracer
tracer for egg
Last updated 2 years ago by fengmk2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install egg-tracer 
SYNC missed versions from official npm registry.

egg-tracer

NPM version build status Test coverage David deps Known Vulnerabilities npm download

tracer for egg.

Install

$ npm i egg-tracer

Usage

Enable tracer plugin:

// config/plugin.js
exports.tracer = {
  enable: true,
  package: 'egg-tracer',
};

Build my own tracer

// my_tracer.js
const Tracer = require('egg-tracer');

const counter = 0;

class MyTracer extends Tracer {
  get tracerId() {
    return `${counter++}-${Date.now()}-${process.pid}`;
  }
}

Change the config to use MyTracer:

// config/config.default.js
exports.tracer = {
  Class: require('path/to/my_tracer.js'),
};

Questions & Suggestions

Please open an issue here.

License

MIT

Current Tags

  • 1.1.0                                ...           latest (2 years ago)

2 Versions

  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 2
This Week 2
This Month 177
Last Day 2
Last Week 87
Last Month 265
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |