diff --git a/GUIDELINES.md b/GUIDELINES.md index fbee8623a8..a3850fc6e3 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -198,6 +198,84 @@ Instrumentation may add additional patch/unpatch messages for specific functions The cases above are not covered by the base class and offer additional context to the user troubleshooting an issue with the instrumentation. +## Supported Versions + +Supported versions can refer to 2 entities in the context of OpenTelemetry instrumentations: + +- `Instrumented Package` - This is the user-facing package/s that the end user has installed in his application and is familiar with. +- `Patched Package` - These are the packages that are being patched in practice to achieve the instrumentation goals. It may be `Instrumented Package` itself or transitive internal dependencies of the `Instrumented Package`. + +### `Instrumented Package` Documentation + +Instrumentation should have a "## Supported Versions" section in the README file that lists the supported versions range of the instrumented package. This range should hide and consolidate any internal implementation details like the use of internal modules, different patch logic for different versions, etc. It should focus on the relevance to the human consumer. + +### `Patched Package`s Supported Versions + +The packages to patch are specified in the `InstrumentationNodeModuleDefinition` and `InstrumentationNodeModuleFile` classes. Instrumentation can specify arrays with different package names and version ranges to use to implement the instrumentation logic. example use: + +```js +const supportedVersions = ['>=1.2.3 <3']; + + protected init() { + + const someModuleFile = new InstrumentationNodeModuleFile( + 'foo/lib/some-file.js', + supportedVersions, + myFilePatch, + myFileUnpatch, + ); + + const module = new InstrumentationNodeModuleDefinition( + 'foo', + supportedVersions, + myModulePatch, + myModuleUnpatch, + [someModuleFile] + ); + return module + } +``` + +### Variations + +There can be few variations between the instrumented package and the patched package: + +- Single Module - instrumentation patches the same module that is instrumented. +- Different Modules - instrumentation patches internal modules with different names and version ranges as of the instrumented package. +- Node.js Core Modules - instrumentation patches a Node.js internal module. +- Multiple Modules - instrumentation may instrument a set of (potentially large number of) user-facing instrumented packages. +- Patch Logic - instrumentation may use the `moduleExports` to patch, or hooks up to other mechanisms for recording signals. examples are: Node.js diagnostics channel, patching globals (like `window` being patched in browser instrumentations, or patches arbitrary lambda function handlers, etc. + +### Range Specification + +For versions that are a closed range, instrumentations should prefer to specify the supported versions of the instrumented package as `>=x.y.z =1.2.3`, for the instrumented package. +- For `Node.js Core Modules`, the supported versions range is set to `['*']` to advertise that the instrumentation is compatible with all versions of Node.js that OpenTelemetry supports. +- For `Multiple Modules`, the supported versions range should be specified for each module in the README file with the supported versions. +- For `Different Patch Logic`, the use of supported versions can sometimes be more flexible, and the README should specify useful versioning information. + +### Add New Supported Versions + +When a new major version of the instrumented package is released, renovate bot will open a PR in contrib which helps maintainers to become aware of it. The instrumentation maintainer should review the new version and check compatibility with existing code. It can then be added to the supported versions list to be released in the next version of the instrumentation. + +Checklist for adding a new version to the supported versions list: + +- [ ] Review which functions are patched by the instrumentation and if they were changed in the new version that need support in code. +- [ ] Check for breaking changes in the new version that could affect the instrumentation. +- [ ] Test the instrumentation with the new version to ensure it works as expected. +- [ ] Update the supported versions list in the instrumentation code, perhaps with different patches and additional `InstrumentationNodeModuleDefinition`s that target the new version. +- [ ] Update the README file to reflect the support for new versions. +- [ ] For instrumentations that use test-all-versions `.tav.yml`, add the new version to the list of versions to test. + ## package.json ### Description diff --git a/packages/winston-transport/README.md b/packages/winston-transport/README.md index 977d2da610..73b360ad95 100644 --- a/packages/winston-transport/README.md +++ b/packages/winston-transport/README.md @@ -51,7 +51,7 @@ const logger = winston.createLogger({ ### Supported versions -Winston `3.x` +- [`winston`](https://www.npmjs.com/package/winston) versions `>=3.0.0 <4` ## Useful links diff --git a/plugins/node/instrumentation-amqplib/README.md b/plugins/node/instrumentation-amqplib/README.md index 1fce886b89..4db4c91e49 100644 --- a/plugins/node/instrumentation-amqplib/README.md +++ b/plugins/node/instrumentation-amqplib/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-amqplib ## Supported Versions -- `>=0.5.5` +- [`amqplib`](https://www.npmjs.com/package/amqplib) versions `>=0.5.5 <1` ## Usage diff --git a/plugins/node/instrumentation-amqplib/src/amqplib.ts b/plugins/node/instrumentation-amqplib/src/amqplib.ts index 6cca9bfd80..b5050f1396 100644 --- a/plugins/node/instrumentation-amqplib/src/amqplib.ts +++ b/plugins/node/instrumentation-amqplib/src/amqplib.ts @@ -74,6 +74,8 @@ import { } from './utils'; import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; +const supportedVersions = ['>=0.5.5 <1']; + export class AmqplibInstrumentation extends InstrumentationBase { protected override _config!: AmqplibInstrumentationConfig; @@ -92,28 +94,28 @@ export class AmqplibInstrumentation extends InstrumentationBase { protected init() { const channelModelModuleFile = new InstrumentationNodeModuleFile( 'amqplib/lib/channel_model.js', - ['>=0.5.5'], + supportedVersions, this.patchChannelModel.bind(this), this.unpatchChannelModel.bind(this) ); const callbackModelModuleFile = new InstrumentationNodeModuleFile( 'amqplib/lib/callback_model.js', - ['>=0.5.5'], + supportedVersions, this.patchChannelModel.bind(this), this.unpatchChannelModel.bind(this) ); const connectModuleFile = new InstrumentationNodeModuleFile( 'amqplib/lib/connect.js', - ['>=0.5.5'], + supportedVersions, this.patchConnect.bind(this), this.unpatchConnect.bind(this) ); const module = new InstrumentationNodeModuleDefinition( 'amqplib', - ['>=0.5.5'], + supportedVersions, undefined, undefined, [channelModelModuleFile, connectModuleFile, callbackModelModuleFile] diff --git a/plugins/node/instrumentation-cucumber/README.md b/plugins/node/instrumentation-cucumber/README.md index acc5466c36..60933c2c10 100644 --- a/plugins/node/instrumentation-cucumber/README.md +++ b/plugins/node/instrumentation-cucumber/README.md @@ -15,6 +15,10 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-cucumber ``` +## Supported Versions + +- [`@cucumber/cucumber`](https://www.npmjs.com/package/@cucumber/cucumber) versions `>=8.0.0 <11` + ## Usage ```js diff --git a/plugins/node/instrumentation-cucumber/src/instrumentation.ts b/plugins/node/instrumentation-cucumber/src/instrumentation.ts index 42962feb78..564f4e9604 100644 --- a/plugins/node/instrumentation-cucumber/src/instrumentation.ts +++ b/plugins/node/instrumentation-cucumber/src/instrumentation.ts @@ -46,6 +46,8 @@ type Cucumber = typeof cucumber; type Hook = (typeof hooks)[number]; type Step = (typeof steps)[number]; +const supportedVersions = ['>=8.0.0 <11']; + export class CucumberInstrumentation extends InstrumentationBase { private module: Cucumber | undefined; @@ -57,7 +59,7 @@ export class CucumberInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( '@cucumber/cucumber', - ['^8.0.0', '^9.0.0', '^10.0.0'], + supportedVersions, (moduleExports: Cucumber) => { this.module = moduleExports; steps.forEach(step => { @@ -83,7 +85,7 @@ export class CucumberInstrumentation extends InstrumentationBase { [ new InstrumentationNodeModuleFile( '@cucumber/cucumber/lib/runtime/test_case_runner.js', - ['^8.0.0', '^9.0.0', '^10.0.0'], + supportedVersions, moduleExports => { if (isWrapped(moduleExports.default.prototype.run)) { this._unwrap(moduleExports.default.prototype, 'run'); diff --git a/plugins/node/instrumentation-dataloader/README.md b/plugins/node/instrumentation-dataloader/README.md index 9f3a1f0832..bef652dfbd 100644 --- a/plugins/node/instrumentation-dataloader/README.md +++ b/plugins/node/instrumentation-dataloader/README.md @@ -15,9 +15,9 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-dataloader ``` -### Supported Versions +## Supported Versions -- `^2.0.0` +- [`dataloader`](https://www.npmjs.com/package/dataloader) versions `>=2.0.0 <3` ## Usage diff --git a/plugins/node/instrumentation-dataloader/src/instrumentation.ts b/plugins/node/instrumentation-dataloader/src/instrumentation.ts index ecfa6ac9aa..617104ee7d 100644 --- a/plugins/node/instrumentation-dataloader/src/instrumentation.ts +++ b/plugins/node/instrumentation-dataloader/src/instrumentation.ts @@ -52,7 +52,7 @@ export class DataloaderInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( MODULE_NAME, - ['^2.0.0'], + ['>=2.0.0 <3'], dataloader => { this._patchLoad(dataloader.prototype); this._patchLoadMany(dataloader.prototype); diff --git a/plugins/node/instrumentation-fs/README.md b/plugins/node/instrumentation-fs/README.md index 77718809da..669b33ee93 100644 --- a/plugins/node/instrumentation-fs/README.md +++ b/plugins/node/instrumentation-fs/README.md @@ -17,6 +17,10 @@ See the full list of instrumented functions in [constants.ts](src/constants.ts); npm install --save @opentelemetry/instrumentation-fs ``` +## Supported Versions + +- Node.js `>=14` + ## Usage ```js diff --git a/plugins/node/instrumentation-kafkajs/README.md b/plugins/node/instrumentation-kafkajs/README.md index 9f00d430e2..a5f54ee2ee 100644 --- a/plugins/node/instrumentation-kafkajs/README.md +++ b/plugins/node/instrumentation-kafkajs/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-kafkajs ### Supported versions -- `<3.0.0` +- [`kafkajs`](https://www.npmjs.com/package/kafkajs) versions `>=0.1.0 <3` ## Usage diff --git a/plugins/node/instrumentation-kafkajs/src/instrumentation.ts b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts index ed3eeeea27..69a158e815 100644 --- a/plugins/node/instrumentation-kafkajs/src/instrumentation.ts +++ b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts @@ -72,7 +72,7 @@ export class KafkaJsInstrumentation extends InstrumentationBase { const module = new InstrumentationNodeModuleDefinition( 'kafkajs', - ['< 3'], + ['>=0.1.0 <3'], (moduleExports: typeof kafkaJs) => { unpatch(moduleExports); this._wrap( diff --git a/plugins/node/instrumentation-lru-memoizer/README.md b/plugins/node/instrumentation-lru-memoizer/README.md index d59881a792..0e6d62ed4c 100644 --- a/plugins/node/instrumentation-lru-memoizer/README.md +++ b/plugins/node/instrumentation-lru-memoizer/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-lru-memoizer ## Supported Versions -- `>=1.3 <3` +- [`lru-memorizer`](https://www.npmjs.com/package/lru-memoizer) versions `>=1.3.0 <3` ## Usage diff --git a/plugins/node/instrumentation-mongoose/README.md b/plugins/node/instrumentation-mongoose/README.md index 159e01568b..717b928f13 100644 --- a/plugins/node/instrumentation-mongoose/README.md +++ b/plugins/node/instrumentation-mongoose/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-mongoose ## Supported Versions -- `>=5.9.7 <7` +- [`mongoose`](https://www.npmjs.com/package/mongoose) versions `>=5.9.7 <7` ## Usage diff --git a/plugins/node/instrumentation-runtime-node/README.md b/plugins/node/instrumentation-runtime-node/README.md index 017a372db4..d3f1160db9 100644 --- a/plugins/node/instrumentation-runtime-node/README.md +++ b/plugins/node/instrumentation-runtime-node/README.md @@ -6,6 +6,12 @@ This module provides automatic metric instrumentation that exposes measurements from the [Performance measurement APIs](https://nodejs.org/api/perf_hooks.html) (i.e. `perf_hooks`). While currently it is limited to metrics, it may be modified to produce other signals in the future. +## Supported Versions + +- Node.js `>=14.10` + + + ## Example ```bash @@ -58,12 +64,6 @@ nodejs_performance_event_loop_utilization 0.010140079547955264 |---|---|---|---|---| | [`eventLoopUtilizationMeasurementInterval`](./src/types.ts#L25) | `int` | millisecond | `5000` | The approximate number of milliseconds for which to calculate event loop utilization averages. A larger value will result in more accurate averages at the expense of less granular data. Should be set to below the scrape interval of your metrics collector to avoid duplicated data points. | -## Supported Node.js versions - -v14.10.0+ - - - ## Useful links - For more information on OpenTelemetry, visit: diff --git a/plugins/node/instrumentation-socket.io/README.md b/plugins/node/instrumentation-socket.io/README.md index 28370b58f2..fd30b8cbd6 100644 --- a/plugins/node/instrumentation-socket.io/README.md +++ b/plugins/node/instrumentation-socket.io/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-socket.io ## Supported Versions -- `>=2 <5` +- [socket.io](https://www.npmjs.com/package/socket.io) versions `>=2.0.0 <5` ## Usage diff --git a/plugins/node/instrumentation-tedious/README.md b/plugins/node/instrumentation-tedious/README.md index d12d5b1982..33c523556b 100644 --- a/plugins/node/instrumentation-tedious/README.md +++ b/plugins/node/instrumentation-tedious/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-tedious ## Supported Versions -- `>=1.11.0 <=17` +- [tedious](https://www.npmjs.com/package/tedious) `>=1.11.0 <18` ## Usage diff --git a/plugins/node/instrumentation-undici/README.md b/plugins/node/instrumentation-undici/README.md index cf533955fc..7d78fbd647 100644 --- a/plugins/node/instrumentation-undici/README.md +++ b/plugins/node/instrumentation-undici/README.md @@ -16,7 +16,7 @@ npm install --save @opentelemetry/instrumentation-undici ## Supported Versions -- `undici@>=5.12.0` +- [`undici`](https://www.npmjs.com/package/undici) version `>=5.12.0` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md index 59543ddb2d..8122156176 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md @@ -19,6 +19,10 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-aws-lambda ``` +## Supported Versions + +- This package will instrument the lambda execution regardless of versions. + ## Usage Create a file to initialize the instrumentation, such as `lambda-wrapper.js`. diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md index 52017e7497..ee4dd002b3 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md @@ -15,6 +15,11 @@ If total installation size is not constrained, it is recommended to use the [`@o npm install --save @opentelemetry/instrumentation-aws-sdk ``` +## Supported Versions + +- [`aws-sdk`](https://www.npmjs.com/package/aws-sdk) versions `>=2.308.0 <3` +- `@aws-sdk/client-*` versions `>=3.0.0 <4` + ## Usage For further automatic instrumentation instruction see the [@opentelemetry/instrumentation](https://www.npmjs.com/package/@opentelemetry/instrumentation) package. diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/README.md b/plugins/node/opentelemetry-instrumentation-bunyan/README.md index 84bf360858..a9f70d220e 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/README.md +++ b/plugins/node/opentelemetry-instrumentation-bunyan/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-bunyan ## Supported Versions -- `bunyan@^1.0.0` +- [`bunyan`](https://www.npmjs.com/package/bunyan) versions `>=1.0.0 <2` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts index c2eb53bb58..e70fab1a00 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts @@ -45,7 +45,7 @@ export class BunyanInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'bunyan', - ['<2.0'], + ['>=1.0.0 <2'], (module: any) => { const instrumentation = this; const Logger = diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/README.md b/plugins/node/opentelemetry-instrumentation-cassandra/README.md index ce80ed50ee..43b6563eb7 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/README.md +++ b/plugins/node/opentelemetry-instrumentation-cassandra/README.md @@ -15,6 +15,10 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-cassandra-driver ``` +### Supported Versions + +- [`cassandra-driver`](https://www.npmjs.com/package/cassandra-driver) versions `>=4.4.0 <5` + ## Usage ```js @@ -45,10 +49,6 @@ await client.execute('select * from foo'); | `responseHook` | `CassandraDriverResponseCustomAttributeFunction` | `undefined` | Hook for adding custom attributes before response is handled | | `maxQueryLength` | `number` | `65536` | If `enhancedDatabaseReporting` is enabled, limits the attached query strings to this length. | -### Supported versions - -`>=4.4 <5.0` - ## Semantic Conventions This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts index 3d90300b9c..46949a7380 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts @@ -43,7 +43,7 @@ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { EventEmitter } from 'events'; import type * as CassandraDriver from 'cassandra-driver'; -const supportedVersions = ['>=4.4 <5.0']; +const supportedVersions = ['>=4.4.0 <5']; export class CassandraDriverInstrumentation extends InstrumentationBase { protected override _config!: CassandraDriverInstrumentationConfig; diff --git a/plugins/node/opentelemetry-instrumentation-connect/README.md b/plugins/node/opentelemetry-instrumentation-connect/README.md index d16302b84a..fb70ac71d5 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/README.md +++ b/plugins/node/opentelemetry-instrumentation-connect/README.md @@ -23,7 +23,7 @@ npm install --save @opentelemetry/instrumentation-http @opentelemetry/instrument ### Supported Versions -- `^3.0.0` +- [`connect`](https://www.npmjs.com/package/connect) versions `>=3.0.0 <4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts index 0c1fde4956..a57048b265 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts @@ -50,7 +50,7 @@ export class ConnectInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'connect', - ['^3.0.0'], + ['>=3.0.0 <4'], moduleExports => { return this._patchConstructor(moduleExports); } diff --git a/plugins/node/opentelemetry-instrumentation-dns/README.md b/plugins/node/opentelemetry-instrumentation-dns/README.md index d394584264..1a0358f2bc 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/README.md +++ b/plugins/node/opentelemetry-instrumentation-dns/README.md @@ -19,6 +19,10 @@ If total installation size is not constrained, it is recommended to use the [`@o npm install --save @opentelemetry/instrumentation-dns ``` +## Supported Versions + +- Node.js `>=14` + ## Usage ```js diff --git a/plugins/node/opentelemetry-instrumentation-express/README.md b/plugins/node/opentelemetry-instrumentation-express/README.md index f6758e09db..742dc21a81 100644 --- a/plugins/node/opentelemetry-instrumentation-express/README.md +++ b/plugins/node/opentelemetry-instrumentation-express/README.md @@ -19,7 +19,7 @@ npm install --save @opentelemetry/instrumentation-http @opentelemetry/instrument ### Supported Versions -- `^4.0.0` +- [`express`](https://www.npmjs.com/package/express) version `>=4.0.0 <5` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts index f15e8cb2ce..c3f5602cac 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts @@ -67,7 +67,7 @@ export class ExpressInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'express', - ['^4.0.0'], + ['>=4.0.0 <5'], moduleExports => { const routerProto = moduleExports.Router as unknown as express.Router; // patch express.Router.route diff --git a/plugins/node/opentelemetry-instrumentation-fastify/README.md b/plugins/node/opentelemetry-instrumentation-fastify/README.md index ffaf255868..4eb0f07d70 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/README.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-http @opentelemetry/instrument ### Supported Versions -- fastify: `^3.0.0 || ^4.0.0` +- [`fastify`](https://www.npmjs.com/package/fastify) versions `>=3.0.0 <5` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts index 34871ee978..641bfc86e4 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts @@ -63,7 +63,7 @@ export class FastifyInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'fastify', - ['^3.0.0', '^4.0.0'], + ['>=3.0.0 <5'], moduleExports => { return this._patchConstructor(moduleExports); } diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/README.md b/plugins/node/opentelemetry-instrumentation-generic-pool/README.md index ea9dee4228..90404555dc 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/README.md +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-generic-pool ### Supported Versions -- `>=2.0.0` +- [`generic-pool`](https://www.npmjs.com/package/generic-pool) version `>=2.0.0 <4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index 08b31e5eb1..aed3416f36 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -40,7 +40,7 @@ export default class Instrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( MODULE_NAME, - ['>=3'], + ['>=3.0.0 <4'], moduleExports => { const Pool: any = moduleExports.Pool; if (isWrapped(Pool.prototype.acquire)) { @@ -61,7 +61,7 @@ export default class Instrumentation extends InstrumentationBase { ), new InstrumentationNodeModuleDefinition( MODULE_NAME, - ['^2.4'], + ['>=2.4.0 <3'], moduleExports => { const Pool: any = moduleExports.Pool; if (isWrapped(Pool.prototype.acquire)) { @@ -82,7 +82,7 @@ export default class Instrumentation extends InstrumentationBase { ), new InstrumentationNodeModuleDefinition( MODULE_NAME, - ['2 - 2.3'], + ['>=2.0.0 <2.4'], moduleExports => { this._isDisabled = false; if (isWrapped(moduleExports.Pool)) { diff --git a/plugins/node/opentelemetry-instrumentation-graphql/README.md b/plugins/node/opentelemetry-instrumentation-graphql/README.md index 5a23f47660..9de60ce985 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/README.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/README.md @@ -21,7 +21,7 @@ npm install @opentelemetry/instrumentation-graphql ### Supported Versions -`^14.0 | ^15.0 | ^16.0` +- [`graphql`](https://www.npmjs.com/package/graphql) versions `>=14.0.0 <17` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts index e6e55cf118..88cb3afec9 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts @@ -61,7 +61,7 @@ const DEFAULT_CONFIG: GraphQLInstrumentationConfig = { ignoreResolveSpans: false, }; -const supportedVersions = ['>=14 <17']; +const supportedVersions = ['>=14.0.0 <17']; export class GraphQLInstrumentation extends InstrumentationBase { constructor(config: GraphQLInstrumentationConfig = {}) { diff --git a/plugins/node/opentelemetry-instrumentation-hapi/README.md b/plugins/node/opentelemetry-instrumentation-hapi/README.md index c9b4062ea5..1333b3fd80 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/README.md +++ b/plugins/node/opentelemetry-instrumentation-hapi/README.md @@ -21,7 +21,7 @@ npm install --save @opentelemetry/instrumentation-hapi ### Supported Versions -- `>=17.0.0 <22` +- [`@hapi/hapi`](https://www.npmjs.com/package/@hapi/hapi) versions `>=17.0.0 <22` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts index 8fd9442974..9951dac8ed 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts @@ -56,7 +56,7 @@ export class HapiInstrumentation extends InstrumentationBase { protected init() { return new InstrumentationNodeModuleDefinition( HapiComponentName, - ['>=17 <22'], + ['>=17.0.0 <22'], (module: any) => { const moduleExports: typeof Hapi = module[Symbol.toStringTag] === 'Module' ? module.default : module; diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/README.md b/plugins/node/opentelemetry-instrumentation-ioredis/README.md index 907eba1995..d8063be0b8 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/README.md +++ b/plugins/node/opentelemetry-instrumentation-ioredis/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-ioredis ### Supported Versions -- `>=2.0.0 <6` +- [`ioredis`](https://www.npmjs.com/package/ioredis) versions `>=2.0.0 <6` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index abf9e2c5e8..346eed7165 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -54,7 +54,7 @@ export class IORedisInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'ioredis', - ['>1', '<6'], + ['>=2.0.0 <6'], (module, moduleVersion?: string) => { const moduleExports = module[Symbol.toStringTag] === 'Module' diff --git a/plugins/node/opentelemetry-instrumentation-knex/README.md b/plugins/node/opentelemetry-instrumentation-knex/README.md index ba3e97846e..61404aa594 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/README.md +++ b/plugins/node/opentelemetry-instrumentation-knex/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-knex ### Supported Versions -- `>=0.10.0` +- [`knex`](https://www.npmjs.com/package/knex) versions `>=0.10.0 <4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/constants.ts b/plugins/node/opentelemetry-instrumentation-knex/src/constants.ts index dfb011cd45..2887f41925 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/constants.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/constants.ts @@ -17,7 +17,7 @@ export const MODULE_NAME = 'knex'; export const SUPPORTED_VERSIONS = [ // use "lib/execution" for runner.js, "lib" for client.js as basepath, latest tested 0.95.6 - '>=0.22.0', + '>=0.22.0 <4', // use "lib" as basepath '>=0.10.0 <0.18.0', '>=0.19.0 <0.22.0', diff --git a/plugins/node/opentelemetry-instrumentation-koa/README.md b/plugins/node/opentelemetry-instrumentation-koa/README.md index aee8051ccd..dc07813ffc 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/README.md +++ b/plugins/node/opentelemetry-instrumentation-koa/README.md @@ -21,8 +21,8 @@ npm install --save @opentelemetry/instrumentation-koa ### Supported Versions -- `koa`: `^2.0.0` -- `@koa/router`: `>=8` +- [`koa`](https://www.npmjs.com/package/koa) versions `>=2.0.0 <3` +- [`@koa/router`](https://www.npmjs.com/package/@koa/router) versions `>=8.0.0` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts index 0598850569..646b91704a 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts @@ -50,7 +50,7 @@ export class KoaInstrumentation extends InstrumentationBase { protected init() { return new InstrumentationNodeModuleDefinition( 'koa', - ['^2.0.0'], + ['>=2.0.0 <3'], (module: any) => { const moduleExports: typeof koa = module[Symbol.toStringTag] === 'Module' diff --git a/plugins/node/opentelemetry-instrumentation-memcached/README.md b/plugins/node/opentelemetry-instrumentation-memcached/README.md index 24e6477889..d429346390 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/README.md +++ b/plugins/node/opentelemetry-instrumentation-memcached/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-memcached ### Supported Versions -- `>=2.2` +- [`memcached`](https://www.npmjs.com/package/memcached) versions `>=2.2.0 <3` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts index 600179254b..f29bf1ca14 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts @@ -56,7 +56,7 @@ export class Instrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'memcached', - ['>=2.2'], + ['>=2.2.0 <3'], (moduleExports: typeof Memcached, moduleVersion) => { this.ensureWrapped( moduleExports.prototype, diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/README.md b/plugins/node/opentelemetry-instrumentation-mongodb/README.md index efec965ee9..ca43f4e3bd 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/README.md +++ b/plugins/node/opentelemetry-instrumentation-mongodb/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-mongodb ### Supported Versions -- `>=3.3 <7` +- [`mongodb`](https://www.npmjs.com/package/mongodb) version `>=3.3.0 <7` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts index 54d9dfa26c..62086bc6bd 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts @@ -94,13 +94,13 @@ export class MongoDBInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'mongodb', - ['>=3.3 <4'], + ['>=3.3.0 <4'], undefined, undefined, [ new InstrumentationNodeModuleFile( 'mongodb/lib/core/wireprotocol/index.js', - ['>=3.3 <4'], + ['>=3.3.0 <4'], v3PatchConnection, v3UnpatchConnection ), @@ -108,37 +108,37 @@ export class MongoDBInstrumentation extends InstrumentationBase { ), new InstrumentationNodeModuleDefinition( 'mongodb', - ['4.*', '5.*', '6.*'], + ['>=4.0.0 <7'], undefined, undefined, [ new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection.js', - ['4.*', '5.*', '>=6 <6.4'], + ['>=4.0.0 <6.4'], v4PatchConnectionCallback, v4UnpatchConnection ), new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection.js', - ['>=6.4'], + ['>=6.4.0 <7'], v4PatchConnectionPromise, v4UnpatchConnection ), new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connection_pool.js', - ['4.*', '5.*', '>=6 <6.4'], + ['>=4.0.0 <6.4'], v4PatchConnectionPool, v4UnpatchConnectionPool ), new InstrumentationNodeModuleFile( 'mongodb/lib/cmap/connect.js', - ['4.*', '5.*', '6.*'], + ['>=4.0.0 <7'], v4PatchConnect, v4UnpatchConnect ), new InstrumentationNodeModuleFile( 'mongodb/lib/sessions.js', - ['4.*', '5.*', '6.*'], + ['>=4.0.0 <7'], v4PatchSessions, v4UnpatchSessions ), diff --git a/plugins/node/opentelemetry-instrumentation-mysql/README.md b/plugins/node/opentelemetry-instrumentation-mysql/README.md index 971fc5351a..ee4b8da9a4 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/README.md +++ b/plugins/node/opentelemetry-instrumentation-mysql/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-mysql ## Supported Versions -- `2.x` +- [`mysql`](https://www.npmjs.com/package/mysql) versions `>=2.0.0 <3` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts index 11eab4bf93..5ce35c594f 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts @@ -81,7 +81,7 @@ export class MySQLInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'mysql', - ['2.*'], + ['>=2.0.0 <3'], (moduleExports: typeof mysqlTypes) => { if (isWrapped(moduleExports.createConnection)) { this._unwrap(moduleExports, 'createConnection'); diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/README.md b/plugins/node/opentelemetry-instrumentation-mysql2/README.md index a0f3c73658..52d6d65d60 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/README.md +++ b/plugins/node/opentelemetry-instrumentation-mysql2/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-mysql2 ## Supported Versions -- `>= 1.4.2, < 4.0` +- [`mysql2`](https://www.npmjs.com/package/mysql2) versions `>=1.4.2 <4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts index 38f2ce8bd3..ee8ebfc6f5 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -52,7 +52,7 @@ export class MySQL2Instrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'mysql2', - ['>= 1.4.2 < 4.0'], + ['>=1.4.2 <4'], (moduleExports: any) => { const ConnectionPrototype: mysqlTypes.Connection = moduleExports.Connection.prototype; diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md index 1c1f0cd347..932f94097f 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-nestjs-core ### Supported Versions -- `>=4.0.0` +- [`@nestjs/core`](https://www.npmjs.com/package/@nestjs/core) versions `>=4.0.0 <11` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts index a7b2380250..79337e9834 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts @@ -33,6 +33,8 @@ import { } from '@opentelemetry/semantic-conventions'; import { AttributeNames, NestType } from './enums'; +const supportedVersions = ['>=4.0.0 <11']; + export class Instrumentation extends InstrumentationBase { static readonly COMPONENT = '@nestjs/core'; static readonly COMMON_ATTRIBUTES = { @@ -46,12 +48,12 @@ export class Instrumentation extends InstrumentationBase { init() { const module = new InstrumentationNodeModuleDefinition( Instrumentation.COMPONENT, - ['>=4.0.0'] + supportedVersions ); module.files.push( - this.getNestFactoryFileInstrumentation(['>=4.0.0']), - this.getRouterExecutionContextFileInstrumentation(['>=4.0.0']) + this.getNestFactoryFileInstrumentation(supportedVersions), + this.getRouterExecutionContextFileInstrumentation(supportedVersions) ); return module; diff --git a/plugins/node/opentelemetry-instrumentation-net/README.md b/plugins/node/opentelemetry-instrumentation-net/README.md index 60fc7ca98a..de1422c187 100644 --- a/plugins/node/opentelemetry-instrumentation-net/README.md +++ b/plugins/node/opentelemetry-instrumentation-net/README.md @@ -17,6 +17,10 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-net ``` +## Supported Versions + +- Node.js `>=14` + ## Usage ```js diff --git a/plugins/node/opentelemetry-instrumentation-pg/README.md b/plugins/node/opentelemetry-instrumentation-pg/README.md index abc18e2089..ba267f7f17 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/README.md +++ b/plugins/node/opentelemetry-instrumentation-pg/README.md @@ -17,7 +17,8 @@ npm install --save @opentelemetry/instrumentation-pg ### Supported Versions -- `>=8 <9` +- [`pg`](https://www.npmjs.com/package/pg) versions `>=8.0.0 <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 c6bee00999..5d472a94b7 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts @@ -50,7 +50,7 @@ export class PgInstrumentation extends InstrumentationBase { protected init() { const modulePG = new InstrumentationNodeModuleDefinition( 'pg', - ['8.*'], + ['>=8.0.0 <9'], (module: any) => { const moduleExports: typeof pgTypes = module[Symbol.toStringTag] === 'Module' @@ -91,7 +91,7 @@ export class PgInstrumentation extends InstrumentationBase { const modulePGPool = new InstrumentationNodeModuleDefinition( 'pg-pool', - ['2.*', '3.*'], + ['>=2.0.0 <4'], (moduleExports: typeof pgPoolTypes) => { if (isWrapped(moduleExports.prototype.connect)) { this._unwrap(moduleExports.prototype, 'connect'); diff --git a/plugins/node/opentelemetry-instrumentation-pino/README.md b/plugins/node/opentelemetry-instrumentation-pino/README.md index a4038c5f57..4e132bd220 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/README.md +++ b/plugins/node/opentelemetry-instrumentation-pino/README.md @@ -15,6 +15,10 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-pino ``` +### Supported Versions + +- [`pino`](https://www.npmjs.com/package/pino) versions `>=5.14.0 <10` + ## Usage ```js @@ -61,10 +65,6 @@ For the current active span, the following fields are injected. These field name When no span context is active or the span context is invalid, injection is skipped. -### Supported versions - -`>=5.14.0 <10` - ## Semantic Conventions This package does not currently generate any attributes from semantic conventions. diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/README.md b/plugins/node/opentelemetry-instrumentation-redis-4/README.md index 19eea1b33a..a8e9449d4b 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/README.md +++ b/plugins/node/opentelemetry-instrumentation-redis-4/README.md @@ -17,7 +17,8 @@ npm install --save @opentelemetry/instrumentation-redis-4 ### Supported Versions -This package supports `redis@^4.0.0` +- [`redis`](https://www.npmjs.com/package/redis) versions `>=4.0.0` + For versions `redis@^2.6.0` and `redis@^3.0.0`, please use `@opentelemetry/instrumentation-redis` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-redis/README.md b/plugins/node/opentelemetry-instrumentation-redis/README.md index f345f9ac02..b5c9f1cdc1 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/README.md +++ b/plugins/node/opentelemetry-instrumentation-redis/README.md @@ -3,7 +3,7 @@ [![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image] -This module provides automatic instrumentation for the [`redis@^2.6.0`](https://github.com/NodeRedis/node_redis) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle. +This module provides automatic instrumentation for the [`redis`](https://github.com/NodeRedis/node_redis) module versions `>=2.6.0 <4`, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle. If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience. @@ -17,8 +17,9 @@ npm install --save @opentelemetry/instrumentation-redis ### Supported Versions -This package supports `redis@^2.6.0` and `redis@^3.0.0` -For version `redis@^4.0.0`, please use `@opentelemetry/instrumentation-redis-4` +- [`redis`](https://www.npmjs.com/package/redis) versions `>=2.6.0 <4` + +For versions `redis@^4.0.0`, please use `@opentelemetry/instrumentation-redis-4` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts index 1d627b5820..93928cc29f 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts @@ -48,7 +48,7 @@ export class RedisInstrumentation extends InstrumentationBase { return [ new InstrumentationNodeModuleDefinition( 'redis', - ['^2.6.0', '^3.0.0'], + ['>=2.6.0 <4'], moduleExports => { if ( isWrapped( diff --git a/plugins/node/opentelemetry-instrumentation-restify/README.md b/plugins/node/opentelemetry-instrumentation-restify/README.md index fd9b7fc7cd..dc08120c43 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 -- `>=4.0.0 <12` +- [`restify`](https://www.npmjs.com/package/restify) versions `>=4.0.0 <12` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/constants.ts b/plugins/node/opentelemetry-instrumentation-restify/src/constants.ts index ebd38f91cc..6298f2d56b 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/constants.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/constants.ts @@ -24,4 +24,3 @@ export const RESTIFY_METHODS = [ 'patch', ]; export const MODULE_NAME = 'restify'; -export const SUPPORTED_VERSIONS = ['>=4.0.0 <12']; diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts index 5d4c7f39cb..ea682f74de 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts @@ -35,6 +35,8 @@ import { isPromise, isAsyncFunction } from './utils'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; import type { RestifyInstrumentationConfig } from './types'; +const supportedVersions = ['>=4.0.0 <12']; + export class RestifyInstrumentation extends InstrumentationBase { constructor(config: RestifyInstrumentationConfig = {}) { super(PACKAGE_NAME, PACKAGE_VERSION, config); @@ -54,7 +56,7 @@ export class RestifyInstrumentation extends InstrumentationBase { init() { const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, - constants.SUPPORTED_VERSIONS, + supportedVersions, (moduleExports, moduleVersion) => { this._moduleVersion = moduleVersion; return moduleExports; @@ -64,7 +66,7 @@ export class RestifyInstrumentation extends InstrumentationBase { module.files.push( new InstrumentationNodeModuleFile( 'restify/lib/server.js', - constants.SUPPORTED_VERSIONS, + supportedVersions, moduleExports => { this._isDisabled = false; const Server: any = moduleExports; diff --git a/plugins/node/opentelemetry-instrumentation-router/README.md b/plugins/node/opentelemetry-instrumentation-router/README.md index 152a9cf081..29c2a54f05 100644 --- a/plugins/node/opentelemetry-instrumentation-router/README.md +++ b/plugins/node/opentelemetry-instrumentation-router/README.md @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-router ### Supported Versions -- `>=1.0.0` +- [`router`](https://www.npmjs.com/package/router) versions `>=1.0.0 <2` ## Usage diff --git a/plugins/node/opentelemetry-instrumentation-router/src/constants.ts b/plugins/node/opentelemetry-instrumentation-router/src/constants.ts index ae69202fe3..a45b7aabf6 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/constants.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/constants.ts @@ -15,7 +15,6 @@ */ export const MODULE_NAME = 'router'; -export const SUPPORTED_VERSIONS = ['1']; // Router.prototype.handle export const ROUTE_ROUTER_FN = `function router(req, res, next) { diff --git a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts index 50803ab148..d4f875bbc3 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts @@ -34,6 +34,8 @@ import * as utils from './utils'; import AttributeNames from './enums/AttributeNames'; import LayerType from './enums/LayerType'; +const supportedVersions = ['>=1.0.0 <2']; + export default class RouterInstrumentation extends InstrumentationBase { constructor(config: InstrumentationConfig = {}) { super(PACKAGE_NAME, PACKAGE_VERSION, config); @@ -44,7 +46,7 @@ export default class RouterInstrumentation extends InstrumentationBase { init() { const module = new InstrumentationNodeModuleDefinition( constants.MODULE_NAME, - constants.SUPPORTED_VERSIONS, + supportedVersions, (moduleExports, moduleVersion) => { this._moduleVersion = moduleVersion; return moduleExports; @@ -54,7 +56,7 @@ export default class RouterInstrumentation extends InstrumentationBase { module.files.push( new InstrumentationNodeModuleFile( 'router/lib/layer.js', - constants.SUPPORTED_VERSIONS, + supportedVersions, moduleExports => { const Layer: any = moduleExports; if (isWrapped(Layer.prototype.handle_request)) { diff --git a/plugins/node/opentelemetry-instrumentation-winston/README.md b/plugins/node/opentelemetry-instrumentation-winston/README.md index 9dfa9365b7..4680f759e2 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/README.md +++ b/plugins/node/opentelemetry-instrumentation-winston/README.md @@ -15,6 +15,12 @@ Compatible with OpenTelemetry JS API and SDK `1.0+`. npm install --save @opentelemetry/instrumentation-winston ``` +### Supported Versions + +- [`winston`](https://www.npmjs.com/package/winston) versions `>=1.0.0 <4` + +Log sending: [`winston`](https://www.npmjs.com/package/winston) versions `>=3.0.0 <4` + ## Usage ```js @@ -98,14 +104,6 @@ logHook: (span, record) => { Log injection can be disabled with the `disableLogCorrelation: true` option. -### Supported versions - -`1.x`, `2.x`, `3.x` - -Log sending - -`3.x` - ## Semantic Conventions This package does not currently generate any attributes from semantic conventions.