Skip to content

Commit

Permalink
fix instrumentations
Browse files Browse the repository at this point in the history
  • Loading branch information
bengl committed Aug 30, 2024
1 parent 25ea166 commit 291a074
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ concurrency:

jobs:
aerospike-node-16:
strategy:
matrix:
node-version: [16]
range: ['>=4.0.0 <5.2.0']
runs-on: ubuntu-latest
services:
aerospike:
Expand All @@ -25,7 +29,7 @@ jobs:
env:
PLUGINS: aerospike
SERVICES: aerospike
PACKAGE_VERSION_RANGE: '>=4.0.0 <5.2.0'
PACKAGE_VERSION_RANGE: '${{ matrix.range }}'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/testagent/start
Expand Down Expand Up @@ -245,7 +249,7 @@ jobs:
couchbase:
strategy:
matrix:
range: ['^2.6.12', '^3.0.7', '>=4.2.0']
range: ['^2.6.12', '^3.0.7', '>=4']
runs-on: ubuntu-latest
services:
couchbase:
Expand Down
15 changes: 14 additions & 1 deletion packages/datadog-instrumentations/src/aerospike.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,23 @@ function wrapProcess (process) {
}
}

const versions = (() => {
switch (process.versions.node.split('.')[0]) {
case '16':
return ['>=4 <5.2.0']
case '18':
return ['5.2.0 - 5.7.0']
case '20':
return ['>=5.8.0']
default:
return []
}
})()

addHook({
name: 'aerospike',
file: 'lib/commands/command.js',
versions: ['^3.16.2', '4', '5']
versions
},
commandFactory => {
return shimmer.wrapFunction(commandFactory, f => wrapCreateCommand(f))
Expand Down

0 comments on commit 291a074

Please sign in to comment.