Report trace infomation to zipkin server in Egg.js.
$ npm i egg-opentracing-zipkin --save
egg-opentracing-zipkin depends on egg-opentracing, you should enable these plugin.
// {app_root}/config/plugin.js
exports.opentracing = {
enable: true,
package: 'egg-opentracing',
};
exports.zipkin = {
enable: true,
package: 'egg-opentracing-zipkin',
};
// {app_root}/config/config.default.js
exports.zipkin = {
endpoint: 'http://locahost:9411',
version: 'v2',
interval: 1000,
};
- endpoint: the hostname of zipkin server.
- version: zipkin API server, default is v2.
- interval: how often to sync spans
see config/config.default.js for more detail.
Please open an issue here.