dd-trace
Advanced tools
Comparing version 0.2.1-beta.0 to 0.2.1-beta.1
{ | ||
"name": "dd-trace", | ||
"version": "0.2.1-beta.0", | ||
"version": "0.2.1-beta.1", | ||
"description": "Datadog APM tracing client for JavaScript (experimental)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,3 +20,3 @@ 'use strict' | ||
this._context.run(() => { | ||
const childOf = options.childOf || this._context.get('current') | ||
const childOf = options.childOf !== undefined ? options.childOf : this._context.get('current') | ||
const tags = Object.assign({ | ||
@@ -23,0 +23,0 @@ 'service.name': options.service || this._service, |
@@ -59,2 +59,13 @@ 'use strict' | ||
it('should support explicitly creating a root span', done => { | ||
tracer = new Tracer(config) | ||
tracer.trace('parent', parent => { | ||
tracer.trace('child', { childOf: null }, child => { | ||
expect(child.context()).to.have.property('parentId', null) | ||
done() | ||
}) | ||
}) | ||
}) | ||
it('should set default tags', done => { | ||
@@ -61,0 +72,0 @@ tracer = new Tracer(config) |
202790
5732