Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

OpenTelemetry Zipkin Trace Exporter

Gitter chat NPM Published Version dependencies devDependencies Apache License

OpenTelemetry Zipkin Trace Exporter allows the user to send collected traces to Zipkin.

Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in microservice architectures. It manages both the collection and lookup of this data.


npm install --save @opentelemetry/exporter-zipkin


Install the exporter on your application and pass the options, it must contain a service name.

const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin');

// Add your zipkin url (`http://localhost:9411/api/v2/spans` is used as
// default) and application name to the Zipkin options
const options = {
  url: 'your-zipkin-url',
  serviceName: 'your-application-name'
const exporter = new ZipkinExporter(options);

Now, register the exporter and start tracing.

tracer.addSpanProcessor(new BatchSpanProcessor(exporter));

You can use built-in SimpleSpanProcessor or BatchSpanProcessor or write your own.

  • SimpleSpanProcessor: The implementation of SpanProcessor that passes ended span directly to the configured SpanExporter.
  • BatchSpanProcessor: The implementation of the SpanProcessor that batches ended spans and pushes them to the configured SpanExporter. It is recommended to use this SpanProcessor for better performance and optimization.

Viewing your traces

Please visit the Zipkin UI endpoint http://localhost:9411

Useful links


Apache 2.0 - See LICENSE for more information.

You can’t perform that action at this time.