# zipkin-javascript-opentracing

> An opentracing implementation for zipkin

Latest version **3.0.0** (published 2020-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install zipkin-javascript-opentracing
pnpm add zipkin-javascript-opentracing
yarn add zipkin-javascript-opentracing
bun add zipkin-javascript-opentracing
```

## Health

**Score 38/100 (D)** — status: abandoned.

Positive: has types package; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2020-08-30 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/zipkin-javascript-opentracing) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Daniel Schmidt |
| Maintainers | dschmidt |
| Keywords | zipkin, opentracing, tracing, tracking, performance, benchmarking |

## Links

- npm: https://www.npmjs.com/package/zipkin-javascript-opentracing
- Repository: https://github.com/DanielMSchmidt/zipkin-javascript-opentracing
- Homepage: https://github.com/DanielMSchmidt/zipkin-javascript-opentracing#readme
- Issues: https://github.com/DanielMSchmidt/zipkin-javascript-opentracing/issues
- npm.io page: https://npm.io/package/zipkin-javascript-opentracing

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2020-08-30
- 2.1.0 — 2020-01-28
- 2.0.1 — 2019-07-19
- 2.0.0 — 2018-08-01
- 1.6.0 — 2018-07-11
- 1.5.1 — 2017-12-12
- 1.5.0 — 2017-12-11
- 1.4.2 — 2017-12-08
- 1.4.1 — 2017-12-08
- 1.4.0 — 2017-11-14
- 1.3.3 — 2017-11-01
- 1.3.2 — 2017-11-01
- 1.3.1 — 2017-11-01
- 1.3.0 — 2017-11-01
- 1.2.0 — 2017-10-31
- … 8 more at https://npm.io/package/zipkin-javascript-opentracing/versions

## README

# Zipkin-Javascript-Opentracing [![Build Status](https://travis-ci.org/DanielMSchmidt/zipkin-javascript-opentracing.svg?branch=master)](https://travis-ci.org/DanielMSchmidt/zipkin-javascript-opentracing) [![Coverage Status](https://coveralls.io/repos/github/DanielMSchmidt/zipkin-javascript-opentracing/badge.svg?branch=master)](https://coveralls.io/github/DanielMSchmidt/zipkin-javascript-opentracing?branch=master)

## Installation

Run `npm install --save zipkin-javascript-opentracing` to install the library.

For usage instructions, please see the examples in the [`examples/`](examples/)
directory. There is a [basic vanilly
javascript](https://github.com/DanielMSchmidt/zipkin-javascript-opentracing/tree/master/examples/vanillajs/basic)
example that shows how to use the tracer in the context of a single express
server and there is an [advanced vanilla
javascript](https://github.com/DanielMSchmidt/zipkin-javascript-opentracing/tree/master/examples/vanillajs/advanced)
example that shows how multiple services (express API and frontend) might
interact and share a tracing context.

## Limitations

### injecting and ejecting

We currently only support HTTP Headers. If you need your own mechanism, feel
free to do a PR. Also we assume that you only inject the HTTP Headers once,
otherwise we will send multiple `ClientSend` annotations for you.

Also you can only finish spans which were not extracted. If you like this
behaviour to be different, please open an issue.

### Flags

They are currently not supported, feel free to do a PR.

### Follows From (zipkin)

FollowsFrom is not supported by openTracing, as far as I understand.

### Additional options for starting a span

We need to know if this is a server or client to set the right annotations.
Therefore we need the kind attribute to be set.

## Example

All examples need to run zipkin on `"localhost:9411"`. This is best achieved by
using docker:

```bash
docker run -d -p 9411:9411 openzipkin/zipkin
```

### Basic

To see how to use this library with only one service see
`examples/vanillajs/basic`. You can run the example with `npm run example:basic`.

### Advanced

In order to see how different services may pick up spans and extend them, please
see the advanced example at `examples/vaniallajs/advanced`. You can run the
example with `npm run example:advanced`.

---
_Source: https://npm.io/package/zipkin-javascript-opentracing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
