Socket
Socket
Sign inDemoInstall

egg-tracer

Package Overview
Dependencies
0
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    egg-tracer

tracer for egg


Version published
Weekly downloads
763
decreased by-16.25%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

2.0.0 (2023-01-07)

⚠ BREAKING CHANGES

  • Drop Node.js < 14 support

Features

  • upgrade all deps to latest versions (#6) (516ae2b)

Readme

Source

egg-tracer

NPM version Test coverage Known Vulnerabilities npm download

tracer plugin 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 traceId() {
    return `${counter++}-${Date.now()}-${process.pid}`;
  }
}
module.exports = MyTracer;

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

Keywords

FAQs

Last updated on 07 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc