Nonchalant Programming Master
    Have ideas to improve npm?Join in the discussion! »

    egg-tracer-sdwk

    1.0.2 • Public • Published

    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

    Install

    npm i egg-tracer-sdwk

    DownloadsWeekly Downloads

    5

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.37 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar