zipkin-transport-kafka
This is a module that sends Zipkin trace data from zipkin-js to Kafka.
Usage
npm install zipkin-transport-kafka --save
const Tracer BatchRecorder jsonEncoder: JSON_V2 } = ;const KafkaLogger = ;const noop = ; const kafkaRecorder = logger: clientOpts: connectionString: 'localhost:2181' encoder: JSON_V2 // optional (defaults to THRIFT) log: noop // optional (defaults to console) ; const tracer = recorder ctxImpl // this would typically be a CLSContext or ExplicitContext localServiceName: 'service-a' // name of this application;
If you do not use zookeeper to store offsets, use clientOpts.kafkaHost
instead of clientOpts.connectionString
.
const BatchRecorder = ;const KafkaLogger = ; const kafkaRecorder = logger: clientOpts: kafkaHost: 'localhost:2181' ;