egg-tracer-sdwk
Version:
tracer for egg
27 lines (22 loc) • 491 B
JavaScript
;
const TRACER = Symbol('context#tracer')
const Tracer = require('../../lib/tracer.js')
module.exports = {
get tracer() {
if (!this[TRACER]) {
this[TRACER] = new Tracer(this)
}
return this[TRACER]
},
}
// module.exports = {
// get tracer() {
// if (this[isReady]) {
// return new Trancer(this.ctx);
// }
// if (!this[cacheTracer]) {
// this[cacheTracer] = new Trancer(this.ctx);
// }
// return this[cacheTracer];
// },
// }