dd-trace 2.25.0 → 2.25.1

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.25.0",
3
+ "version": "2.25.1",
4
4
  "description": "Datadog APM tracing client for JavaScript",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -60,7 +60,5 @@ function filename (name, file) {
60
60
 
61
61
  module.exports = {
62
62
  filename,
63
- getVersion,
64
- matchVersion,
65
63
  pathSepExpr
66
64
  }
@@ -70,5 +70,5 @@ if (originalLambdaHandler !== undefined) {
70
70
  addHook({ name: lambdaFilePath }, patchLambdaModule(handlerPath))
71
71
  } else {
72
72
  // Instrumentation is done manually.
73
- addHook({ name: 'datadog-lambda-js', versions: ['>=6.85.0'] }, patchDatadogLambdaModule)
73
+ addHook({ name: 'datadog-lambda-js' }, patchDatadogLambdaModule)
74
74
  }
@@ -15,8 +15,6 @@ const Hook = require('../../../../datadog-instrumentations/src/helpers/hook')
15
15
  const instrumentations = require('../../../../datadog-instrumentations/src/helpers/instrumentations')
16
16
  const {
17
17
  filename,
18
- getVersion,
19
- matchVersion,
20
18
  pathSepExpr
21
19
  } = require('../../../../datadog-instrumentations/src/helpers/register')
22
20
 
@@ -111,21 +109,18 @@ const registerLambdaHook = () => {
111
109
  })
112
110
  } else {
113
111
  const moduleToPatch = 'datadog-lambda-js'
114
- Hook([moduleToPatch], (moduleExports, moduleName, moduleBaseDir) => {
112
+ Hook([moduleToPatch], (moduleExports, moduleName, _) => {
115
113
  moduleName = moduleName.replace(pathSepExpr, '/')
116
114
 
117
115
  require('./patch')
118
116
 
119
- for (const { name, file, versions, hook } of instrumentations[moduleToPatch]) {
117
+ for (const { name, file, hook } of instrumentations[moduleToPatch]) {
120
118
  const fullFilename = filename(name, file)
121
119
  if (moduleName === fullFilename) {
122
- const version = getVersion(moduleBaseDir)
123
- if (matchVersion(version, versions)) {
124
- try {
125
- moduleExports = hook(moduleExports)
126
- } catch (e) {
127
- log.error(e)
128
- }
120
+ try {
121
+ moduleExports = hook(moduleExports)
122
+ } catch (e) {
123
+ log.error(e)
129
124
  }
130
125
  }
131
126
  }