# @opentelemetry/shim-opentracing

> OpenTracing to OpenTelemetry shim

Latest version **2.11.0** (published 2026-08-31) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @opentelemetry/shim-opentracing
pnpm add @opentelemetry/shim-opentracing
yarn add @opentelemetry/shim-opentracing
bun add @opentelemetry/shim-opentracing
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.11.0 |
| Published | 2026-08-31 |
| First published | 2019-10-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | ^18.19.0 \|\| >=20.6.0 |
| Dependencies | 3 |
| Unpacked size | 51.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3471 |
| Author | OpenTelemetry Authors |
| Maintainers | dyladan, pichlermarc, overbalance, npmjs-account, trentm, martinkuba |
| Keywords | opentelemetry, nodejs, tracing, profiling |

## Links

- npm: https://www.npmjs.com/package/@opentelemetry/shim-opentracing
- Repository: https://github.com/open-telemetry/opentelemetry-js
- Homepage: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing
- Issues: https://github.com/open-telemetry/opentelemetry-js/issues
- npm.io page: https://npm.io/package/@opentelemetry/shim-opentracing

## Dependencies (3)

- [opentracing](https://npm.io/package/opentracing.md) ^0.14.4
- [@opentelemetry/core](https://npm.io/package/@opentelemetry/core.md) 2.11.0
- [@opentelemetry/semantic-conventions](https://npm.io/package/@opentelemetry/semantic-conventions.md) ^1.29.0

## Recent versions

- 2.11.0 (latest) — 2026-08-31
- 2.11.0-development.0 (canary) — 2026-08-31
- 1.8.0 (next) — 2022-11-09
- 2.10.0 — 2026-07-21
- 2.9.0 — 2026-07-02
- 2.8.0 — 2026-06-11
- 2.7.1 — 2026-04-29
- 2.7.0 — 2026-04-17
- 2.6.1 — 2026-03-25
- 2.6.0 — 2026-03-03
- 2.5.1 — 2026-02-12
- 2.5.0 — 2026-01-21
- 2.4.0 — 2026-01-14
- 2.3.0 — 2026-01-08
- 2.2.0 — 2025-10-21
- … 217 more at https://npm.io/package/@opentelemetry/shim-opentracing/versions

## README

# OpenTracing shim

[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]

> [!IMPORTANT]
> As of April 2026, OpenTracing compatibility requirements in the OpenTelemetry specification [were deprecated](https://opentelemetry.io/blog/2026/deprecating-opentracing-compatibility/).
> This package (`@opentelemetry/shim-opentracing`) will be removed in the upcoming [SDK 3.0 milestone](https://github.com/open-telemetry/opentelemetry-js/milestone/20), planned for approximately September 2026.
> Version 2.x will be maintained for one year, per the [OpenTelemetry stability policy](https://opentelemetry.io/docs/specs/otel/versioning-and-stability/#sdk-support).

OpenTracing shim allows existing OpenTracing instrumentation to report to OpenTelemetry

## Installation

```bash
npm install --save @opentelemetry/shim-opentracing
```

## Usage

Use the TracerShim wherever you initialize your OpenTracing tracers.

```javascript
const opentracing = require('opentracing');

// Old tracer initialization.
const tracer = myOpenTracingTracer(...);
opentracing.initGlobalTracer(tracer);

// New tracer initialization.
import { TracerShim } from '@opentelemetry/shim-opentracing';

const tracer = myOpenTelemetryTracer(...)
opentracing.initGlobalTracer(new TracerShim(tracer));

```

Optionally, you can specify propagators to be used for the OpenTracing `TextMap` and `HttpHeaders` formats:

```javascript
var b3Propagator = new B3Propagator();
new TracerShim(tracer, {
  textMapPropagator: b3Propagator,
  httpHeadersPropagator: b3Propagator
})
```

If propagators are not specified, OpenTelemetry's global propagator will be used.

## License

Apache 2.0 - See [LICENSE][license-url] for more information.

## Limitation

The OpenTracing shim does not currently include a scope manager.
This feature was never implemented in OpenTracing JS therefore the
shim does not provide that feature.

## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]

[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/shim-opentracing
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fshim-opentracing.svg

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