Socket
Socket
Sign inDemoInstall

dd-trace

Package Overview
Dependencies
Maintainers
3
Versions
579
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dd-trace - npm Package Compare versions

Comparing version 0.8.0-beta.4 to 0.8.0-beta.5

src/noop/span_context.js

2

lib/version.js

@@ -1,1 +0,1 @@

module.exports = '0.8.0-beta.4'
module.exports = '0.8.0-beta.5'
{
"name": "dd-trace",
"version": "0.8.0-beta.4",
"version": "0.8.0-beta.5",
"description": "Datadog APM tracing client for JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -57,3 +57,3 @@ 'use strict'

done(err, res)
})
}, parent)
}

@@ -60,0 +60,0 @@

'use strict'
const BaseTracer = require('opentracing').Tracer
const NoopTracer = require('./noop')
const NoopTracer = require('./noop/tracer')
const DatadogTracer = require('./tracer')

@@ -113,7 +113,2 @@ const Config = require('./config')

/**
* Get the scope manager to manager context propagation for the tracer.
*
* @returns {ScopeManager} The scope manager.
*/
scopeManager () {

@@ -125,5 +120,5 @@ this._deprecate('scopeManager')

/**
* Get the current scope to manage context propagation for the tracer.
* Get the scope manager to manager context propagation for the tracer.
*
* @returns {ScopeManager} The scope manager.
* @returns {Scope} The scope manager.
*/

@@ -130,0 +125,0 @@ scope () {

@@ -8,3 +8,13 @@ 'use strict'

/**
* The Datadog Scope Manager. This is used for context propagation.
*
* @hideconstructor
*/
class Scope {
/**
* Get the current active span or null if there is none.
*
* @returns {Span} The active span.
*/
active () {

@@ -14,2 +24,9 @@ return this._active() || null

/**
* Activate a span in the scope of a function.
*
* @param {external:"opentracing.Span"} span The span to activate.
* @param {Function} [callback] Function that will have the span activated on its scope.
* @returns The return value of the callback.
*/
activate (span, callback) {

@@ -21,2 +38,9 @@ if (typeof callback !== 'function') return callback

/**
* Binds a target to the provided span, or the active span if omitted.
*
* @param {Function|Promise|EventEmitter} target Function that will have the span activated on its scope.
* @param {?(external:"opentracing.Span")} [span=scope.active()] The span to activate.
* @returns The bound target.
*/
bind (target, span) {

@@ -23,0 +47,0 @@ if (this._isEmitter(target)) {

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