@fastify/zipkin
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

@fastify/zipkin

CI NPM version js-standard-style

Fastify plugin for Zipkin distributed tracing system.

Install

npm i @fastify/zipkin

Usage

Require the plugin and register it within Fastify, then pass the following options: { serviceName, httpReporterUrl [, servicePort , tracer, recorder ] }

const fastify = require('fastify')()

fastify.register(require('@fastify/zipkin'), {
  serviceName: 'my-service-name',
  servicePort: 3000,
  httpReporterUrl: 'http://localhost:9411/api/v2/spans'
})

fastify.get('/', (req, reply) => {
  reply.send({ hello: 'world' })
})

fastify.listen({ port: 3000 }, err => {
  if (err) throw err
  console.log('Server listenting on localhost:', fastify.server.address().port)
})

License

Licensed under MIT.

Package Sidebar

Install

npm i @fastify/zipkin

Weekly Downloads

68

Version

3.2.0

License

MIT

Unpacked Size

15.2 kB

Total Files

12

Last publish

Collaborators

  • gurgunday
  • metcoder95
  • galvez
  • simenb
  • coopflow
  • simoneb
  • rafaelgss
  • starptech
  • delvedor
  • matteo.collina
  • allevo
  • jsumners
  • zekth
  • eomm
  • fox1t
  • airhorns
  • kibertoad
  • climba03003
  • is2ei
  • fdawgs