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

0.12.1 • Public • Published

Zipkin-transport-http

This is a module that sends Zipkin trace data to a configurable HTTP endpoint.

Usage:

npm install zipkin-transport-http --save

const {
  Tracer,
  BatchRecorder,
  jsonEncoder: {JSON_V2}
} = require('zipkin');
const {HttpLogger} = require('zipkin-transport-http');

const recorder = new BatchRecorder({
  logger: new HttpLogger({
    endpoint: 'http://localhost:9411/api/v2/spans',
    jsonEncoder: JSON_V2, // optional, defaults to JSON_V1
    httpInterval: 1000, // how often to sync spans. optional, defaults to 1000
    headers: {'Authorization': 'secret'} // optional custom HTTP headers
  })
});

const tracer = new Tracer({
  recorder,
  ctxImpl, // this would typically be a CLSContext or ExplicitContext
  localServiceName: 'service-a' // name of this application
});

/@govtechsg/zipkin-transport-http/

    Package Sidebar

    Install

    npm i @govtechsg/zipkin-transport-http

    Weekly Downloads

    2

    Version

    0.12.1

    License

    Apache-2.0

    Unpacked Size

    21.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • kenneth_leong_gt
    • govtechsg_a11y
    • younglim
    • gtrgchua
    • isomer.govtech
    • gyunikuchan
    • gds_ace_dlt
    • gdsbot
    • gylsky
    • ryanoolala
    • dyihoon90