Comparing version 0.8.0-beta.4 to 0.8.0-beta.5
@@ -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)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144542
89
4132