OpenCensus Zipkin Trace Exporter
OpenCensus Zipkin Trace Exporter allows the user to send collected traces with OpenCensus Node.js 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.
The library is in alpha stage and the API is subject to change.
Install OpenCensus Zipkin Exporter with:
npm install @opencensus/nodejsnpm install @opencensus/exporter-zipkin
To use Zipkin as your exporter, first, download from any of the three available options on Quickstart: through Docker, on Java or manually compiling the source code. Tests were executed running Zipkin with Java, through the following commands on terminal:
curl -sSL https://zipkin.io/quickstart.sh | bash -sjava -jar zipkin.jar
Instance the exporter on your application and pass the options, it must contain a service name and, optionaly, an URL. If no URL is passed,
http://localhost:9411/api/v2/spans is used as default.
const tracing = ;const zipkin = ;// Add your zipkin url (ex )// and application name to the Zipkin optionsconst options =url: 'your-zipkin-url'serviceName: 'your-application-name'const exporter = options;
Similarly for Typescript:
;;// Add your zipkin url (ex )// and application name to the Zipkin options;
Now, register the exporter and start tracing.
Viewing your traces:
Please visit the Zipkin UI endpoint http://localhost:9411
- For more information on OpenCensus, visit: https://opencensus.io/
- To checkout the OpenCensus for Node.js, visit: https://github.com/census-instrumentation/opencensus-node
- For Zipkin project at https://zipkin.io/
- For help or feedback on this project, join us on gitter