New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/shim-opentracing

Package Overview
Dependencies
Maintainers
4
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/shim-opentracing

OpenTracing to OpenTelemetry shim

  • 0.24.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.1K
increased by11.63%
Maintainers
4
Weekly downloads
 
Created
Source

OpenTracing shim

NPM Published Version dependencies devDependencies Apache License

OpenTracing shim allows existing OpenTracing instrumentation to report to OpenTelemetry

Installation

npm install --save @opentelemetry/shim-opentracing

Usage

Use the TracerShim wherever you initialize your OpenTracing tracers.

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:

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

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

See examples/opentracing-shim for a short example.

License

Apache 2.0 - See LICENSE for more information.

Keywords

FAQs

Package last updated on 28 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc