Comparing version 0.8.0-beta.1 to 0.8.0-beta.2
@@ -1,1 +0,1 @@ | ||
module.exports = '0.8.0-beta.1' | ||
module.exports = '0.8.0-beta.2' |
{ | ||
"name": "dd-trace", | ||
"version": "0.8.0-beta.1", | ||
"version": "0.8.0-beta.2", | ||
"description": "Datadog APM tracing client for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
'use strict' | ||
const Tracer = require('opentracing').Tracer | ||
const Scope = require('./scope/new/base') | ||
@@ -10,10 +11,7 @@ class NoopTracer extends Tracer { | ||
let ScopeManager | ||
let Scope | ||
if (process.env.DD_CONTEXT_PROPAGATION === 'false') { | ||
ScopeManager = require('./scope/noop/scope_manager') | ||
Scope = require('./scope/new/base') | ||
} else { | ||
ScopeManager = require('./scope/scope_manager') | ||
Scope = require('./scope/new/scope') | ||
} | ||
@@ -33,2 +31,6 @@ | ||
scope () { | ||
return this._scope | ||
} | ||
currentSpan () { | ||
@@ -35,0 +37,0 @@ return null |
@@ -44,3 +44,3 @@ 'use strict' | ||
function sendWithTrace (send, channel, args, tracer, config, method, fields) { | ||
const childOf = tracer.scopeManager().active() | ||
const childOf = tracer.scope().active() | ||
const span = tracer.startSpan('amqp.command', { childOf }) | ||
@@ -47,0 +47,0 @@ |
@@ -56,6 +56,2 @@ 'use strict' | ||
if (parent) { | ||
tracer.scopeManager().activate(parent) | ||
} | ||
done(err, res) | ||
@@ -62,0 +58,0 @@ }, parent) |
@@ -56,6 +56,2 @@ 'use strict' | ||
if (parent) { | ||
tracer.scopeManager().activate(parent) | ||
} | ||
done(err, res) | ||
@@ -62,0 +58,0 @@ }) |
@@ -64,5 +64,5 @@ 'use strict' | ||
function startSpan (tracer, config, protocol, tags) { | ||
const scope = tracer.scopeManager().active() | ||
const childOf = tracer.scope().active() | ||
const span = tracer.startSpan(`${protocol}.connect`, { | ||
childOf: scope && scope.span(), | ||
childOf, | ||
tags: Object.assign({ | ||
@@ -69,0 +69,0 @@ 'span.kind': 'client', |
@@ -18,3 +18,3 @@ 'use strict' | ||
return function logWithTrace (level, msg, meta, callback) { | ||
const scope = tracer.scopeManager().active() | ||
const scope = tracer.scope().active() | ||
@@ -21,0 +21,0 @@ if (!scope || arguments.length < 1) return log.apply(this, arguments) |
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
143188
4083