Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 525 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 525 Bytes

correlation

This package provides core opentracing functionality.

Installation

npm i @totalsoft/opentracing

or

yarn add @totalsoft/opentracing

Span Manager

Allows propagating an opentracing span across async/await calls.

async function inner() {
  // Access the active span in scope
  const activeSpan = spanManager.getActiveSpan()
}

// Create a scope where the span will be available
spanManager.useSpanManager(rootSpan, async () => {
  await inner()
})