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

0.1.0 • Public • Published

OpenCensus Zipkin Trace Exporter

Gitter chat

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.

Installation

Install OpenCensus Zipkin Exporter with:

npm install @opencensus/nodejs
npm install @opencensus/exporter-zipkin

Usage

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 -s
java -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.

For javascript:

const tracing = require('@opencensus/nodejs');
const zipkin = require('@opencensus/exporter-zipkin');

// Add your zipkin url (ex http://localhost:9411/api/v2/spans)
// and application name to the Zipkin options
const options = {
  url: 'your-zipkin-url',
  serviceName: 'your-application-name'
}
const exporter = new zipkin.ZipkinTraceExporter(options);

Similarly for Typescript:

import * as tracing from '@opencensus/nodejs';
import { Zipkin } from '@opencensus/exporter-zipkin';

// Add your zipkin url (ex http://localhost:9411/api/v2/spans)
// and application name to the Zipkin options
const options = {
  url: 'your-zipkin-url',
  serviceName: 'your-application-name'
}
const exporter = new Zipkin(options);

Now, register the exporter and start tracing.

tracing.start({'exporter': exporter});

or

tracing.registerExporter(exporter).start();

Viewing your traces:

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

Useful links

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.0189latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.0189
0.0.224
0.0.210
0.0.200
0.0.190
0.0.180
0.0.170
0.0.160
0.0.151
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @opencensus/exporter-zipkin

Weekly Downloads

194

Version

0.1.0

License

Apache-2.0

Unpacked Size

27.5 kB

Total Files

7

Last publish

Collaborators

  • kjin
  • ofrobots
  • google-admin
  • isaikevych
  • google-wombot
  • mayurkale22