dd-trace 2.22.1 → 2.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dd-trace",
3
- "version": "2.22.1",
3
+ "version": "2.22.2",
4
4
  "description": "Datadog APM tracing client for JavaScript",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -265,11 +265,7 @@ const web = {
265
265
 
266
266
  // Extract the parent span from the headers and start a new span as its child
267
267
  startChildSpan (tracer, name, headers) {
268
- const activeSpan = tracer.scope().active()
269
- const spanContext = activeSpan && activeSpan.context()
270
- const isLambda = spanContext && spanContext._name === 'aws.lambda'
271
-
272
- const childOf = (isLambda && activeSpan) || tracer.extract(FORMAT_HTTP_HEADERS, headers)
268
+ const childOf = tracer.scope().active() || tracer.extract(FORMAT_HTTP_HEADERS, headers)
273
269
 
274
270
  const span = tracer.startSpan(name, { childOf })
275
271