Fastify plugin for Zipkin distributed tracing system.
npm i fastify-zipkin --save
Require the plugin and register it within Fastify, the pass the following options: { tracer, serviceName [, servicePort] }
const fastify = require('fastify')()
fastify.register(require('fastify-zipkin'), {
serviceName: 'my-service-name',
servicePort: 3000,
zipkinUrl: 'http://localhost:9411'
})
fastify.get('/', (req, reply) => {
reply.send({ hello: 'world' })
})
fastify.listen(3000, err => {
if (err) throw err
console.log('Server listenting on localhost:', fastify.server.address().port)
})
Licensed under MIT.