Skip to content

LuxChanLu/moleculer-opentracing

Repository files navigation

moleculer-opentracing

Build Status Coverage Status Codacy Badge Maintainability David Known Vulnerabilities

Downloads FOSSA Status

How to use it

You have to use it with a compatible opentracing tracer :

const OpenTracingMixin = require('moleculer-opentracing')
const { Tracer } = require('opentracing')

module.exports = {
  name: 'opentracing',
  mixins: [OpenTracingMixin(new Tracer())]
}

Exemple with datadog :

const OpenTracingMixin = require('moleculer-opentracing')
const Tracer = require('dd-trace').init()

module.exports = {
  name: 'datadog',
  mixins: [OpenTracingMixin(Tracer)]
}