From d7e29e1f9b80db9f01eec90d2f677cf80c004b98 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 8 Oct 2024 14:52:09 -0700 Subject: [PATCH 1/8] chore: update test-all-versions configs to test fewer package versions The TAV tests in CI are taking 2.5h - 3h, for a total usage of over 13h compute time. E.g.: https://github.com/open-telemetry/opentelemetry-js-contrib/actions/runs/11233652488/usage This change reduces the number of tested versions from 839 to 317 (for a TAV run with Node.js v20). For a few of the .tav.yml files the tested version *range* was actually increased to capture some versions that the instrumentation supported, but were not being tested by TAV. --- plugins/node/instrumentation-amqplib/.tav.yml | 8 +++++--- plugins/node/instrumentation-cucumber/.tav.yml | 8 ++++++-- plugins/node/instrumentation-dataloader/.tav.yml | 4 +++- .../node/instrumentation-lru-memoizer/.tav.yml | 4 +++- plugins/node/instrumentation-socket.io/.tav.yml | 8 ++++++-- .../.tav.yml | 13 ++++++++++--- .../opentelemetry-instrumentation-bunyan/.tav.yml | 4 +++- .../.tav.yml | 4 +++- .../.tav.yml | 10 ++++++---- .../.tav.yml | 5 +++-- .../opentelemetry-instrumentation-hapi/.tav.yml | 12 +++++++++--- .../.tav.yml | 5 ++++- .../opentelemetry-instrumentation-koa/.tav.yml | 8 ++++++-- .../.tav.yml | 13 ++++++++++--- .../opentelemetry-instrumentation-mysql2/.tav.yml | 15 ++++++--------- .../.tav.yml | 4 +++- .../opentelemetry-instrumentation-pg/.tav.yml | 9 +++++---- .../opentelemetry-instrumentation-pino/.tav.yml | 11 ++++++----- .../.tav.yml | 12 ++++++------ .../opentelemetry-instrumentation-redis/.tav.yml | 4 +++- .../.tav.yml | 8 ++++++-- .../.tav.yml | 7 ++++--- 22 files changed, 116 insertions(+), 60 deletions(-) diff --git a/plugins/node/instrumentation-amqplib/.tav.yml b/plugins/node/instrumentation-amqplib/.tav.yml index bf4e3eed80..8dd3a78a9b 100644 --- a/plugins/node/instrumentation-amqplib/.tav.yml +++ b/plugins/node/instrumentation-amqplib/.tav.yml @@ -1,4 +1,6 @@ -'amqplib': - versions: ">=0.5.5" +amqplib: + versions: + include: ">=0.5.5" + mode: latest-minors commands: - - yarn test + - npm test diff --git a/plugins/node/instrumentation-cucumber/.tav.yml b/plugins/node/instrumentation-cucumber/.tav.yml index a1771a240c..0a9cf7031d 100644 --- a/plugins/node/instrumentation-cucumber/.tav.yml +++ b/plugins/node/instrumentation-cucumber/.tav.yml @@ -1,7 +1,11 @@ '@cucumber/cucumber': - - versions: '^8.0.0 || ^9.0.0' + - versions: + include: '^8.0.0 || ^9.0.0' + mode: latest-minors node: '>=14' commands: npm test - - versions: '^10.0.0' + - versions: + include: '^10.0.0' + mode: latest-minors node: '>=18' commands: npm test diff --git a/plugins/node/instrumentation-dataloader/.tav.yml b/plugins/node/instrumentation-dataloader/.tav.yml index f0baa3a47a..6b8c5c32dd 100644 --- a/plugins/node/instrumentation-dataloader/.tav.yml +++ b/plugins/node/instrumentation-dataloader/.tav.yml @@ -1,4 +1,6 @@ dataloader: # Testing ^2.0.0 covers about 90% of the downloaded versions - versions: "^2.0.0" + versions: + include: "^2.0.0" + mode: latest-minors commands: npm run test diff --git a/plugins/node/instrumentation-lru-memoizer/.tav.yml b/plugins/node/instrumentation-lru-memoizer/.tav.yml index bf8a138d1b..e6a3bbf017 100644 --- a/plugins/node/instrumentation-lru-memoizer/.tav.yml +++ b/plugins/node/instrumentation-lru-memoizer/.tav.yml @@ -1,4 +1,6 @@ 'lru-memoizer': - versions: ">=1.3 <3" + versions: + include: ">=1.3 <3" + mode: latest-minors commands: - npm test diff --git a/plugins/node/instrumentation-socket.io/.tav.yml b/plugins/node/instrumentation-socket.io/.tav.yml index a7c5a52ec5..c8d487e10d 100644 --- a/plugins/node/instrumentation-socket.io/.tav.yml +++ b/plugins/node/instrumentation-socket.io/.tav.yml @@ -1,5 +1,7 @@ 'socket.io': - - versions: "2.1.1 || 2.2.0 || 2.3.0 || 2.4.0 || ^2.5.0" + - versions: + include: "^2.1.1" + mode: latest-minors peerDependencies: socket.io-client@^2 commands: - npm run test @@ -9,7 +11,9 @@ commands: - npm run test - - versions: "4.5.3 || 4.6.2 || ^4.7.1" + - versions: + include: "^4.5.3" + mode: latest-minors peerDependencies: socket.io-client@^4 commands: - npm run test diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml index 5db96c82f3..e9f8e01018 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml @@ -1,6 +1,8 @@ "aws-sdk": # A small subset of releases in the range [2.308.0, 3) to reduce testing time. - versions: "2.308.0 || 2.556.0 || 2.801.0 || 2.1049.0 || 2.1297.0 || 2.1546.0 || >=2.1548.0" + versions: + include: "^2.308.0" + mode: max-7 commands: - npm run test @@ -8,12 +10,17 @@ # A small subset of releases in the range [3.6.1, 4) to reduce testing time. # - 3.377.0 was a bad release (see issue #1828). # - 3.529.0 was missing the fast-xml-parser dependency (https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.529.1) - versions: "3.6.1 || 3.55.0 || 3.180.0 || 3.289.0 || 3.385.0 || 3.498.0 || >=3.529.1" + versions: + include: "^3.6.1" + exclude: "3.377.0 || 3.529.0" + mode: "max-7" commands: - npm run test "@aws-sdk/client-sqs": # A small subset of releases in the range [3.24.0, 4) to reduce testing time. - versions: "3.24.0 || 3.94.0 || 3.202.0 || 3.296.0 || 3.388.0 || 3.496.0 || >=3.503.1" + versions: + include: "^3.24.0" + mode: "max-7" commands: - npm run test diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/.tav.yml b/plugins/node/opentelemetry-instrumentation-bunyan/.tav.yml index 84c75a6dc0..f3fa90578f 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-bunyan/.tav.yml @@ -1,4 +1,6 @@ bunyan: # Testing ^1.8.12 covers at least 95% of the downloaded versions - versions: "^1.8.12" + versions: + include: "^1.8.12" + mode: latest-minors commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-express/.tav.yml b/plugins/node/opentelemetry-instrumentation-express/.tav.yml index 241e7dcc4b..eeee57a593 100644 --- a/plugins/node/opentelemetry-instrumentation-express/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-express/.tav.yml @@ -1,3 +1,5 @@ express: - - versions: "^4.16.2" + - versions: + include: "^4.16.2" + mode: latest-minors commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-fastify/.tav.yml b/plugins/node/opentelemetry-instrumentation-fastify/.tav.yml index 6f23da47eb..608eb2dbf8 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-fastify/.tav.yml @@ -1,9 +1,11 @@ "fastify": - # Sanity check the first 4.x release, instead of all releases, plus recent - # releases. - - versions: "4.0.0 || >=4.24.3 <5" + - versions: + include: "^4.0.0" + mode: max-7 commands: npm run test - - versions: ">=5 <6" + - versions: + include: ">=5 <6" + mode: max-7 commands: npm run test peerDependencies: "@fastify/express@4.0.1" node: '>=20' diff --git a/plugins/node/opentelemetry-instrumentation-graphql/.tav.yml b/plugins/node/opentelemetry-instrumentation-graphql/.tav.yml index 603ce40daf..ab32f433d2 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-graphql/.tav.yml @@ -1,4 +1,5 @@ graphql: - # Taking a sample from the most downloaded versions in the range "14 || 15 || 16" - versions: "16.4.0 || 16.3.0 || 16.2.0 || 16.0.0 || ^15.8.0 || 15.7.2 || 15.6.1 || 15.6.0 || 15.5.3 || 15.5.1 || 15.5.0 || 15.4.0 || 15.3.0 || ^14.7.0 || 14.6.0 || 14.5.8 || 14.0.0" + versions: + include: "14 || 15 || 16" + mode: max-7 commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml b/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml index c1d07484cb..738740e3f9 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-hapi/.tav.yml @@ -1,11 +1,17 @@ "@hapi/hapi": - - versions: "^19.2.0 || ^18.4.1 || ^17.9.0" + - versions: + include: "^19.2.0 || ^18.4.1 || ^17.9.0" + mode: latest-minors node: ">=14 <16" commands: npm test - - versions: "^20.3.0" + - versions: + include: "^20.3.0" + mode: latest-minors node: ">=14" commands: npm test - - versions: "^21.3.3" + - versions: + include: "^21.3.3" + mode: latest-minors node: ">=14.15.0" commands: npm test diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/.tav.yml b/plugins/node/opentelemetry-instrumentation-ioredis/.tav.yml index cc4d970155..eb2248a00b 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-ioredis/.tav.yml @@ -1,4 +1,7 @@ ioredis: # Ignoring v4.19.0. Tests never ends. Caused by https://github.com/luin/ioredis/pull/1219 - versions: "^2.5.0 || ^3.2.2 || 4.14.1 || 4.16.3 || 4.17.3 || 4.18.0 || 4.19.2 || 4.19.4 || 4.22.0 || 4.24.5 || 4.26.0 || 4.27.11 || ^4.28.5 || 5.0.6 || 5.2.6 || ^5.3.2" + versions: + include: '>=2.0.0 <6' + exclude: '4.19.0' + mode: max-7 commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-koa/.tav.yml b/plugins/node/opentelemetry-instrumentation-koa/.tav.yml index 2cd22120aa..973c1fb861 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-koa/.tav.yml @@ -1,8 +1,12 @@ "@koa/router": - versions: "8.0.8 || 9.4.0 || 10.0.0 || 10.1.1 || 11.0.1 || >=12.0.0" + versions: + include: ">=8.0.0" + mode: latest-minors commands: npm run test koa: # Testing ^2.7.0 covers at least 97% of the downloaded koa versions - versions: "^2.7.0" + versions: + include: "^2.7.0" + mode: latest-minors commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/.tav.yml b/plugins/node/opentelemetry-instrumentation-mongodb/.tav.yml index fadf8c0d27..681ef1dcb6 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-mongodb/.tav.yml @@ -1,5 +1,7 @@ mongodb: - - versions: ">=3.3 <4" + - versions: + include: ">=3.3 <4" + mode: max-7 commands: npm run test-v3 - versions: include: ">=4 <5" @@ -9,9 +11,14 @@ mongodb: # tests for the wrong version. # Ref: https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2001#issuecomment-1992202942 exclude: "4.17.2" + mode: max-7 commands: npm run test-v4 - - versions: ">=5 <6" + - versions: + include: ">=5 <6" + mode: max-7 commands: npm run test-v5-v6 - - versions: ">=6 <7" + - versions: + include: ">=6 <7" + mode: max-7 node: '>=15.0.0' commands: npm run test-v5-v6 diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml b/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml index e0965468ab..10c6cee55b 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml @@ -1,11 +1,8 @@ mysql2: - - versions: <4 >=3.2.0 || 3.1.0 || 3.0.0 - commands: npm run test - - - versions: <3 >=2.3.2 || 2.3.0 || 2.2.5 || 2.1.0 - # Skip 2.3.3 which installs types from git which takes 10m on it's own - commands: npm run test - - - versions: 1.4.2 || 1.5.3 || 1.6.4 || 1.6.5 || 1.7.0 + versions: + include: ">=1.4.2 <4" # Skip v1.6.2, which is broken - commands: npm run test + # Skip 2.3.3 which installs types from git which takes 10m on it's own + exclude: "1.6.2 || 2.3.3" + mode: latest-minors + commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml index ba5fe6062a..468a41b234 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml @@ -1,5 +1,7 @@ "@nestjs/core": - - versions: "^8.2.0 || 8.1.2 || 8.1.1 || 8.0.11 || 8.0.9 || 8.0.6" + - versions: + include: ">=8.0.0 <11" + mode: latest-minors peerDependencies: - "@nestjs/common@^8.0.0" - "@nestjs/microservices@^8.0.0" diff --git a/plugins/node/opentelemetry-instrumentation-pg/.tav.yml b/plugins/node/opentelemetry-instrumentation-pg/.tav.yml index 9f9320f8d5..8d6e020737 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-pg/.tav.yml @@ -1,5 +1,6 @@ pg: - # a sample from supported versions - - versions: "8.5.1 || 8.6.0 || 8.7.1" - peerDependencies: pg-pool@^3 - commands: npm run test + versions: + include: '>=8.0.0 <9' + mode: max-7 + peerDependencies: pg-pool@^3 + commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-pino/.tav.yml b/plugins/node/opentelemetry-instrumentation-pino/.tav.yml index 94d5d5f97e..737cc73989 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-pino/.tav.yml @@ -1,10 +1,11 @@ pino: - - versions: "^9.0.0" + - versions: + include: '>=9.0.0 <10' + mode: latest-minors node: ">=18" commands: npm run test - - versions: "^8.21.0 || 8.20.0 || 8.16.2 || 8.12.1 || 8.8.0 || 8.4.0 || 8.0.0 || ^7.11.0 || 7.8.0 || 7.2.0 || ^6.13.3 || 5.17.0 || 5.14.0" + - versions: + include: '>=5.14.0 <9' + mode: max-7 node: ">=14" commands: npm run test - - versions: "^7.11.0 || 7.8.0 || 7.2.0 || ^6.13.1 || 5.17.0 || 5.14.0" - node: ">=8 <14" - commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/.tav.yml b/plugins/node/opentelemetry-instrumentation-redis-4/.tav.yml index 2a13580b74..8890082e4c 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-redis-4/.tav.yml @@ -1,7 +1,7 @@ redis: - jobs: - # The latest minor releases in the range "^4.0.0", excluding - # "4.6.9", which was a bad release that accidentally broke - # node v14 support. - - versions: "4.0.0 || 4.0.6 || 4.1.1 || 4.2.0 || 4.3.1 || 4.4.0 || 4.5.1 || ^4.6.11" - commands: npm run test + versions: + include: "^4.0.0" + # "4.6.9" was a bad release that accidentally broke node v14 support. + exclude: "4.6.9" + mode: latest-minors + commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-redis/.tav.yml b/plugins/node/opentelemetry-instrumentation-redis/.tav.yml index c6b5a4154f..81020bc78f 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-redis/.tav.yml @@ -1,3 +1,5 @@ redis: - versions: ^2.6.0 || ^3.0.0 + versions: + include: '>=2.6.0 <4' + mode: latest-minors commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-restify/.tav.yml b/plugins/node/opentelemetry-instrumentation-restify/.tav.yml index a1ef4c915c..6ccacb5ed0 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-restify/.tav.yml @@ -1,8 +1,12 @@ restify: - - versions: "^10.0.0 || ^11.1.0" + - versions: + include: '>=10.0.0 <12' + mode: latest-minors node: ">=18" commands: npm run test - - versions: "4.3.4 || 5.2.0 || 6.4.0 || 7.7.0 || ^8.4.0 || 9.1.0 || ^10.0.0 || ^11.1.0" + - versions: + include: '>=4.0.0 <10' + mode: max-7 node: "<18" commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-winston/.tav.yml b/plugins/node/opentelemetry-instrumentation-winston/.tav.yml index 34335a07f7..4ab7caaa65 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-winston/.tav.yml @@ -1,5 +1,6 @@ winston: - # A selection of versions of Winston 2.x and 3.x - - versions: "2.0.0 || 2.4.0 || 2.4.7 || 3.3.1 || 3.6.0 || 3.10.0 || ^3.11.0" - commands: npm run test + versions: + include: '>=2.0.0 <4' + mode: max-7 + commands: npm run test From 15c40db35d29bb4669ea84645c83073cf64b551d Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 9 Oct 2024 16:02:46 -0700 Subject: [PATCH 2/8] instr-restify: bump min-supported from 4.0.0 to 4.1.0 because of some issue with its spdy dep that is not worth digging into Also fine-tune the restify version at which there was a slight behaviour in error handling that broke tests: behaviour change was in v8.2.0, not in v8.0.0. --- plugins/node/opentelemetry-instrumentation-restify/.tav.yml | 2 +- plugins/node/opentelemetry-instrumentation-restify/README.md | 2 +- .../src/instrumentation.ts | 2 +- .../test/restify.test.ts | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-restify/.tav.yml b/plugins/node/opentelemetry-instrumentation-restify/.tav.yml index 6ccacb5ed0..8d354d0d58 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-restify/.tav.yml @@ -6,7 +6,7 @@ restify: commands: npm run test - versions: - include: '>=4.0.0 <10' + include: '>=4.1.0 <10' mode: max-7 node: "<18" commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-restify/README.md b/plugins/node/opentelemetry-instrumentation-restify/README.md index dc08120c43..1894864da5 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/README.md +++ b/plugins/node/opentelemetry-instrumentation-restify/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-restify ### Supported Versions -- [`restify`](https://www.npmjs.com/package/restify) versions `>=4.0.0 <12` +- [`restify`](https://www.npmjs.com/package/restify) versions `>=4.1.0 <12` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts index 372b90d3ae..81c4bc90c0 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts @@ -35,7 +35,7 @@ import { isPromise, isAsyncFunction } from './utils'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import type { RestifyInstrumentationConfig } from './types'; -const supportedVersions = ['>=4.0.0 <12']; +const supportedVersions = ['>=4.1.0 <12']; export class RestifyInstrumentation extends InstrumentationBase { constructor(config: RestifyInstrumentationConfig = {}) { diff --git a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts index 90f50071ed..ee7e6c524e 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/test/restify.test.ts @@ -241,12 +241,13 @@ describe('Restify Instrumentation', () => { rootSpan.end(); assert.strictEqual(memoryExporter.getFinishedSpans().length, 4); - if (semver.satisfies(LIB_VERSION, '>=8')) { + if (semver.satisfies(LIB_VERSION, '>=8.2.0')) { + // Error handling changed slightly in v8.2.0 (https://github.com/restify/node-restify/pull/1757). assert.deepEqual( result, '{"code":"Internal","message":"Error: NOK"}' ); - } else if (semver.satisfies(LIB_VERSION, '>=7 <8')) { + } else if (semver.satisfies(LIB_VERSION, '>=7 <8.2.0')) { assert.deepEqual( result, '{"code":"Internal","message":"caused by Error: NOK"}' From 0a3e6170735a19c39088b44dbb38b3a75cd02647 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 9 Oct 2024 16:33:11 -0700 Subject: [PATCH 3/8] instr-nestjs-core TAV testing: fix for @nestjs/core@9 and 10 Stop installing some '@nestjs/*' deps that aren't necessary for testing with more recent major versions. Also turn of nestjs logging for testing to make the output much cleaner. --- package-lock.json | 148 +++++++++++++++--- .../.tav.yml | 30 ++-- .../package.json | 3 - .../scripts/test-all-versions | 78 --------- .../test/setup.ts | 2 +- 5 files changed, 145 insertions(+), 116 deletions(-) delete mode 100755 plugins/node/opentelemetry-instrumentation-nestjs-core/scripts/test-all-versions diff --git a/package-lock.json b/package-lock.json index 4ac44d4efe..34add00257 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8912,6 +8912,8 @@ "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-9.4.3.tgz", "integrity": "sha512-piMw8d3C4ppc5St5AhQEtecMhyeBK2Q1VYk4AL3NKtG6U0fzz/6KLiETpWdKXmazeI/m7qac2upOvwmRzle0aA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "iterare": "1.2.1", "tslib": "2.5.3" @@ -8969,13 +8971,17 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@nestjs/platform-express": { "version": "9.4.3", "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-9.4.3.tgz", "integrity": "sha512-FpdczWoRSC0zz2dNL9u2AQLXKXRVtq4HgHklAhbL59X0uy+mcxhlSThG7DHzDMkoSnuuHY8ojDVf7mDxk+GtCw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "body-parser": "1.20.2", "cors": "2.8.5", @@ -8997,6 +9003,8 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "ms": "2.0.0" } @@ -9006,6 +9014,8 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -9048,6 +9058,8 @@ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -9072,6 +9084,8 @@ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -9089,19 +9103,25 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@nestjs/platform-express/node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@nestjs/platform-express/node_modules/raw-body": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -9116,13 +9136,17 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@nestjs/websockets": { "version": "9.4.3", "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-9.4.3.tgz", "integrity": "sha512-LMLKJWZbWH3VQRxDK/658ynyN1n5lLCIen/dey2y5TzB0RNgxlSso/YJATVVfWNaT2CxPG8TUQMOTdopXCWGQw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "iterare": "1.2.1", "object-hash": "3.0.0", @@ -9145,7 +9169,9 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/@netflix/nerror": { "version": "1.1.3", @@ -14338,7 +14364,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/append-transform": { "version": "2.0.0", @@ -16475,6 +16503,8 @@ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "streamsearch": "^1.1.0" }, @@ -17734,6 +17764,8 @@ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.6" } @@ -26687,7 +26719,9 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/merge-source-map": { "version": "1.1.0", @@ -27662,6 +27696,8 @@ "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.4-lts.1.tgz", "integrity": "sha512-WeSGziVj6+Z2/MwQo3GvqzgR+9Uc+qt8SwHKh3gvNPiISKfsMfG4SvCOFYlxxgkXt7yIV2i1yczehm0EOKIxIg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "append-field": "^1.0.0", "busboy": "^1.0.0", @@ -27683,6 +27719,8 @@ "engines": [ "node >= 0.8" ], + "optional": true, + "peer": true, "dependencies": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -27695,6 +27733,8 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "minimist": "^1.2.6" }, @@ -27707,6 +27747,8 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -27721,13 +27763,17 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/multer/node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -29616,6 +29662,8 @@ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 6" } @@ -32949,6 +32997,8 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -34079,6 +34129,8 @@ "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=10.0.0" } @@ -39694,9 +39746,6 @@ "devDependencies": { "@nestjs/common": "9.4.3", "@nestjs/core": "9.4.3", - "@nestjs/microservices": "9.4.3", - "@nestjs/platform-express": "9.4.3", - "@nestjs/websockets": "9.4.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", @@ -49101,6 +49150,8 @@ "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-9.4.3.tgz", "integrity": "sha512-piMw8d3C4ppc5St5AhQEtecMhyeBK2Q1VYk4AL3NKtG6U0fzz/6KLiETpWdKXmazeI/m7qac2upOvwmRzle0aA==", "dev": true, + "optional": true, + "peer": true, "requires": { "iterare": "1.2.1", "tslib": "2.5.3" @@ -49110,7 +49161,9 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true } } }, @@ -49119,6 +49172,8 @@ "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-9.4.3.tgz", "integrity": "sha512-FpdczWoRSC0zz2dNL9u2AQLXKXRVtq4HgHklAhbL59X0uy+mcxhlSThG7DHzDMkoSnuuHY8ojDVf7mDxk+GtCw==", "dev": true, + "optional": true, + "peer": true, "requires": { "body-parser": "1.20.2", "cors": "2.8.5", @@ -49132,6 +49187,8 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "optional": true, + "peer": true, "requires": { "ms": "2.0.0" } @@ -49141,6 +49198,8 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", "dev": true, + "optional": true, + "peer": true, "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -49180,6 +49239,8 @@ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", "dev": true, + "optional": true, + "peer": true, "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -49202,6 +49263,8 @@ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dev": true, + "optional": true, + "peer": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -49216,19 +49279,25 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "raw-body": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "dev": true, + "optional": true, + "peer": true, "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -49240,7 +49309,9 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true } } }, @@ -49249,6 +49320,8 @@ "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-9.4.3.tgz", "integrity": "sha512-LMLKJWZbWH3VQRxDK/658ynyN1n5lLCIen/dey2y5TzB0RNgxlSso/YJATVVfWNaT2CxPG8TUQMOTdopXCWGQw==", "dev": true, + "optional": true, + "peer": true, "requires": { "iterare": "1.2.1", "object-hash": "3.0.0", @@ -49259,7 +49332,9 @@ "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true + "dev": true, + "optional": true, + "peer": true } } }, @@ -52629,9 +52704,6 @@ "requires": { "@nestjs/common": "9.4.3", "@nestjs/core": "9.4.3", - "@nestjs/microservices": "9.4.3", - "@nestjs/platform-express": "9.4.3", - "@nestjs/websockets": "9.4.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/instrumentation": "^0.53.0", @@ -58132,7 +58204,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "append-transform": { "version": "2.0.0", @@ -59991,6 +60065,8 @@ "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", "dev": true, + "optional": true, + "peer": true, "requires": { "streamsearch": "^1.1.0" } @@ -60974,7 +61050,9 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "cookie-signature": { "version": "1.0.6", @@ -67928,7 +68006,9 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "merge-source-map": { "version": "1.1.0", @@ -68703,6 +68783,8 @@ "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.4-lts.1.tgz", "integrity": "sha512-WeSGziVj6+Z2/MwQo3GvqzgR+9Uc+qt8SwHKh3gvNPiISKfsMfG4SvCOFYlxxgkXt7yIV2i1yczehm0EOKIxIg==", "dev": true, + "optional": true, + "peer": true, "requires": { "append-field": "^1.0.0", "busboy": "^1.0.0", @@ -68718,6 +68800,8 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, + "optional": true, + "peer": true, "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -68730,6 +68814,8 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, + "optional": true, + "peer": true, "requires": { "minimist": "^1.2.6" } @@ -68739,6 +68825,8 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "optional": true, + "peer": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -68753,13 +68841,17 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, + "optional": true, + "peer": true, "requires": { "safe-buffer": "~5.1.0" } @@ -70268,7 +70360,9 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "object-inspect": { "version": "1.13.1", @@ -72800,6 +72894,8 @@ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dev": true, + "optional": true, + "peer": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -73691,7 +73787,9 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "streamx": { "version": "2.16.1", diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml index 468a41b234..ec8e268fd2 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml @@ -1,29 +1,41 @@ "@nestjs/core": - versions: - include: ">=8.0.0 <11" + include: ">=10.0.0 <11" + mode: latest-minors + peerDependencies: + - "@nestjs/common@^10.0.0" + - "rxjs@^7.1.0" + commands: npm run test + + - versions: + include: ">=9.0.0 <10" + mode: latest-minors + peerDependencies: + - "@nestjs/common@^9.0.0" + - "rxjs@^7.1.0" + commands: npm run test + + - versions: + include: ">=8.0.0 <9" mode: latest-minors peerDependencies: - "@nestjs/common@^8.0.0" - - "@nestjs/microservices@^8.0.0" - - "@nestjs/platform-express@^8.0.0" - - "@nestjs/websockets@^8.0.0" - "rxjs@^7.1.0" commands: npm run test - - versions: "^7.6.17 || 7.6.15 || 7.6.13 || 7.6.12" + - versions: + # We *could* test all 7.x "latest-minors", but the latest 7.x release was + # 2021, so let's just test the latest. + include: "^7.6.18" peerDependencies: - "@nestjs/common@^7.0.0" - - "@nestjs/microservices@^7.0.0" - "@nestjs/platform-express@^7.0.0" - - "@nestjs/websockets@^7.0.0" - "rxjs@^6.0.0" commands: npm run test - versions: "6.11.11" peerDependencies: - "@nestjs/common@^6.0.0" - - "@nestjs/microservices@^6.0.0" - "@nestjs/platform-express@^6.0.0" - - "@nestjs/websockets@^6.0.0" - "rxjs@^6.0.0" commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json index 377b82a2fa..ba291c1e21 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/package.json @@ -47,9 +47,6 @@ "devDependencies": { "@nestjs/common": "9.4.3", "@nestjs/core": "9.4.3", - "@nestjs/microservices": "9.4.3", - "@nestjs/platform-express": "9.4.3", - "@nestjs/websockets": "9.4.3", "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/scripts/test-all-versions b/plugins/node/opentelemetry-instrumentation-nestjs-core/scripts/test-all-versions deleted file mode 100755 index 07de70e070..0000000000 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/scripts/test-all-versions +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -# return to the default package.json and install all deps -git checkout -- package.json -npm install - -test_silent () { - npm run test &> /dev/null && echo OK || echo FAIL -} - -echo -e "\n## 4.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^4.0.0 \ - @nestjs/core@^4.0.0 \ - @nestjs/microservices@^4.0.0 \ - @nestjs/websockets@^4.0.0 \ - rxjs@^5.4.2 \ - rxjs-compat@^6.0.0 > /dev/null -test_silent - -echo -e "\n## ^4.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^4.4.0 \ - @nestjs/core@^4.4.0 \ - @nestjs/microservices@^4.4.0 \ - @nestjs/websockets@^4.4.0 \ - rxjs@^5.4.2 \ - rxjs-compat@^6.0.0 > /dev/null -test_silent - -echo -e "\n## ^5.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^5.0.0 \ - @nestjs/core@^5.0.0 \ - @nestjs/microservices@^5.0.0 \ - @nestjs/websockets@^5.0.0 \ - rxjs@^6.0.0 \ - rxjs-compat@^6.0.0 > /dev/null -test_silent - -echo -e "\n## ^6.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^6.0.0 \ - @nestjs/core@^6.0.0 \ - @nestjs/microservices@^6.0.0 \ - @nestjs/websockets@^6.0.0 \ - @nestjs/platform-express@^6.0.0 \ - rxjs@^6.0.0 \ - rxjs-compat@^6.0.0 > /dev/null -test_silent - -echo -e "\n## ^7.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^7.0.0 \ - @nestjs/core@^7.0.0 \ - @nestjs/microservices@^7.0.0 \ - @nestjs/websockets@^7.0.0 \ - @nestjs/platform-express@^7.0.0 \ - rxjs@^7.0.0 \ - rxjs-compat@latest > /dev/null -test_silent - -echo -e "\n## ^8.0.0" -npm install -D \ - reflect-metadata@0.1.13 \ - @nestjs/common@^8.0.0 \ - @nestjs/core@^8.0.0 \ - @nestjs/microservices@^8.0.0 \ - @nestjs/websockets@^8.0.0 \ - @nestjs/platform-express@^8.0.0 \ - rxjs@^7.2.0 \ - rxjs-compat@latest > /dev/null -test_silent diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/test/setup.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/test/setup.ts index 1b77efe8ea..23fdcb8662 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/test/setup.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/test/setup.ts @@ -232,7 +232,7 @@ export const setup = async (version: string): Promise => { ); } - const app = await core.NestFactory.create(AppModule); + const app = await core.NestFactory.create(AppModule, { logger: false }); if (app.listenAsync) { await app.listenAsync(0, 'localhost'); } else { From f7929bfca0d9b4d7d14ed495d4faa1d708e7a530 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 9 Oct 2024 16:40:03 -0700 Subject: [PATCH 4/8] instr-pg: drop setting IN_TAV which stopped being used in #1393 --- plugins/node/opentelemetry-instrumentation-pg/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index 1012044cb5..834de074a0 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -16,8 +16,8 @@ "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", - "test-all-versions": "cross-env IN_TAV=true tav", - "test-all-versions:local": "cross-env IN_TAV=true RUN_POSTGRES_TESTS_LOCAL=true npm run test-all-versions", + "test-all-versions": "tav", + "test-all-versions:local": "cross-env RUN_POSTGRES_TESTS_LOCAL=true npm run test-all-versions", "test:debug": "ts-mocha --inspect-brk --no-timeouts -p tsconfig.json 'test/**/*.test.ts'", "test:local": "cross-env RUN_POSTGRES_TESTS_LOCAL=true npm run test", "version:update": "node ../../../scripts/version-update.js", From c52e2625681e936f15b2f9b18dac7c37690d883e Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 9 Oct 2024 17:10:34 -0700 Subject: [PATCH 5/8] instr-aws-sdk TAV tests: skip bad releases of client-sqs I believe `@aws-sdk/client-sqs` releases 3.363.0 to 3.377.0 were bad releases (fixed in 3.378.0). https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719 shows how `@aws-sdk/client-s3@3.377.0` was a bad release. Version 3.363.0 was when the `client-*` packages were moved to using "migrated `@smithy` packages" https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.363.0 The comment above shows a particular failing for client-s3. I don't have a smoking gun for the client-sqs old versions, but the tests fail on those versions and it isn't worth digging into the reasons. Let's just skip those versions. --- plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml index e9f8e01018..729131dcdb 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml @@ -21,6 +21,8 @@ # A small subset of releases in the range [3.24.0, 4) to reduce testing time. versions: include: "^3.24.0" + # These were bad releases of client-sqs. + exclude: ">=3.363.0 <=3.377.0" mode: "max-7" commands: - npm run test From 898b3e10e036cb31c2387d721a98d18296037d66 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 10 Oct 2024 21:12:22 -0700 Subject: [PATCH 6/8] pg test failure fixes: - first issue was instr or tests or both don't work with 8.0.0, but *do* with 8.0.3 and later - second issue was an unrelated flakiness in pg.test.ts --- .../opentelemetry-instrumentation-pg/.tav.yml | 2 +- .../README.md | 2 +- .../src/instrumentation.ts | 2 +- .../test/pg-pool.test.ts | 134 +++++++++--------- 4 files changed, 72 insertions(+), 68 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-pg/.tav.yml b/plugins/node/opentelemetry-instrumentation-pg/.tav.yml index 8d6e020737..eea3b2b2fb 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-pg/.tav.yml @@ -1,6 +1,6 @@ pg: versions: - include: '>=8.0.0 <9' + include: '>=8.0.3 <9' mode: max-7 peerDependencies: pg-pool@^3 commands: npm run test diff --git a/plugins/node/opentelemetry-instrumentation-pg/README.md b/plugins/node/opentelemetry-instrumentation-pg/README.md index ba267f7f17..b2657c625e 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/README.md +++ b/plugins/node/opentelemetry-instrumentation-pg/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-pg ### Supported Versions -- [`pg`](https://www.npmjs.com/package/pg) versions `>=8.0.0 <9` +- [`pg`](https://www.npmjs.com/package/pg) versions `>=8.0.3 <9` - [`pg-pool`](https://www.npmjs.com/package/pg-pool) versions `>=2.0.0 <4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts index e7c3da7a5f..ee2ab49fee 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts @@ -124,7 +124,7 @@ export class PgInstrumentation extends InstrumentationBase=8.0.0 <9'], + ['>=8.0.3 <9'], (module: any) => { const moduleExports: typeof pgTypes = module[Symbol.toStringTag] === 'Module' diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts index 84b203788e..cf6bac1197 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts @@ -277,6 +277,7 @@ describe('pg-pool', () => { await client.query('SELECT NOW()'); } finally { client.release(); + await newPool.end(); } const spans = memoryExporter.getFinishedSpans(); assert.strictEqual(spans.length, 0); @@ -492,77 +493,80 @@ describe('pg-pool', () => { }); it('should generate `db.client.connection.count` and `db.client.connection.pending_requests` metrics', async () => { - pool.connect((err, client, release) => { - if (err) { - throw new Error(err.message); - } - if (!release) { - throw new Error('Did not receive release function'); - } - if (!client) { - throw new Error('No client received'); - } - assert.ok(client); - - client.query('SELECT NOW()', async (err, ret) => { - release(); + return new Promise(resolve => { + pool.connect((err, client, release) => { if (err) { throw new Error(err.message); } - assert.ok(ret); + if (!release) { + throw new Error('Did not receive release function'); + } + if (!client) { + throw new Error('No client received'); + } + assert.ok(client); - const { resourceMetrics, errors } = await metricReader.collect(); - assert.deepEqual( - errors, - [], - 'expected no errors from the callback during metric collection' - ); + client.query('SELECT NOW()', async (err, ret) => { + release(); + if (err) { + throw new Error(err.message); + } + assert.ok(ret); - const metrics = resourceMetrics.scopeMetrics[0].metrics; - assert.strictEqual( - metrics[1].descriptor.name, - 'db.client.connection.count' - ); - assert.strictEqual( - metrics[1].descriptor.description, - 'The number of connections that are currently in state described by the state attribute.' - ); - assert.strictEqual( - metrics[1].dataPoints[0].attributes[ - ATTR_DB_CLIENT_CONNECTION_STATE - ], - 'used' - ); - assert.strictEqual( - metrics[1].dataPoints[0].value, - 1, - 'expected to have 1 used connection' - ); - assert.strictEqual( - metrics[1].dataPoints[1].attributes[ - ATTR_DB_CLIENT_CONNECTION_STATE - ], - 'idle' - ); - assert.strictEqual( - metrics[1].dataPoints[1].value, - 0, - 'expected to have 0 idle connections' - ); + const { resourceMetrics, errors } = await metricReader.collect(); + assert.deepEqual( + errors, + [], + 'expected no errors from the callback during metric collection' + ); - assert.strictEqual( - metrics[2].descriptor.name, - 'db.client.connection.pending_requests' - ); - assert.strictEqual( - metrics[2].descriptor.description, - 'The number of current pending requests for an open connection.' - ); - assert.strictEqual( - metrics[2].dataPoints[0].value, - 0, - 'expected to have 0 pending requests' - ); + const metrics = resourceMetrics.scopeMetrics[0].metrics; + assert.strictEqual( + metrics[1].descriptor.name, + 'db.client.connection.count' + ); + assert.strictEqual( + metrics[1].descriptor.description, + 'The number of connections that are currently in state described by the state attribute.' + ); + assert.strictEqual( + metrics[1].dataPoints[0].attributes[ + ATTR_DB_CLIENT_CONNECTION_STATE + ], + 'used' + ); + assert.strictEqual( + metrics[1].dataPoints[0].value, + 1, + 'expected to have 1 used connection' + ); + assert.strictEqual( + metrics[1].dataPoints[1].attributes[ + ATTR_DB_CLIENT_CONNECTION_STATE + ], + 'idle' + ); + assert.strictEqual( + metrics[1].dataPoints[1].value, + 0, + 'expected to have 0 idle connections' + ); + + assert.strictEqual( + metrics[2].descriptor.name, + 'db.client.connection.pending_requests' + ); + assert.strictEqual( + metrics[2].descriptor.description, + 'The number of current pending requests for an open connection.' + ); + assert.strictEqual( + metrics[2].dataPoints[0].value, + 0, + 'expected to have 0 pending requests' + ); + resolve(); + }); }); }); }); From 6bb7fd6af4ebc257902a0f6c55ce87e6719caca0 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Fri, 11 Oct 2024 10:03:21 -0700 Subject: [PATCH 7/8] testing aws-sdk versions: avoid [3.363.0, 3.377.0] of all @aws-sdk/client-* --- .../opentelemetry-instrumentation-aws-sdk/.tav.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml index 729131dcdb..33461acc0b 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml @@ -6,22 +6,22 @@ commands: - npm run test +# Versions [3.363.0, 3.377.0] of all @aws-sdk/client-* were bad releases. See: +# - https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2464#issuecomment-2403652552 +# - https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719 + "@aws-sdk/client-s3": - # A small subset of releases in the range [3.6.1, 4) to reduce testing time. - # - 3.377.0 was a bad release (see issue #1828). # - 3.529.0 was missing the fast-xml-parser dependency (https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.529.1) versions: include: "^3.6.1" - exclude: "3.377.0 || 3.529.0" + exclude: "3.529.0 || >=3.363.0 <=3.377.0" mode: "max-7" commands: - npm run test "@aws-sdk/client-sqs": - # A small subset of releases in the range [3.24.0, 4) to reduce testing time. versions: include: "^3.24.0" - # These were bad releases of client-sqs. exclude: ">=3.363.0 <=3.377.0" mode: "max-7" commands: From 51137f723fb5b4e83927e3c2b7510068371b80d8 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Fri, 11 Oct 2024 11:50:43 -0700 Subject: [PATCH 8/8] nestjs testing: NestJS 10 requires Node.js v16 or later. --- .../node/opentelemetry-instrumentation-nestjs-core/.tav.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml index ec8e268fd2..f412b3cb3e 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml @@ -2,6 +2,9 @@ - versions: include: ">=10.0.0 <11" mode: latest-minors + # NestJS 10 requires Node.js v16 or later. + # https://docs.nestjs.com/migration-guide#dropping-support-for-nodejs-v12 + node: ">=16" peerDependencies: - "@nestjs/common@^10.0.0" - "rxjs@^7.1.0"