From 5c9aca989c204d987fc4f8a7e781bfca0058ecaf Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Sat, 25 May 2024 10:43:36 +0300 Subject: [PATCH 1/9] chore: add script to verify README for instrumentations --- .../README.md | 16 ++++ .../README.md | 10 +++ .../README.md | 2 + .../README.md | 4 +- package.json | 1 + .../node/instrumentation-amqplib/package.json | 1 + .../instrumentation-cucumber/package.json | 1 + plugins/node/instrumentation-fs/package.json | 1 + .../node/instrumentation-kafkajs/package.json | 1 + .../instrumentation-lru-memoizer/package.json | 1 + .../instrumentation-mongoose/package.json | 1 + .../instrumentation-socket.io/package.json | 1 + .../README.md | 4 +- .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../package.json | 1 + .../README.md | 6 +- .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../README.md | 2 + .../package.json | 1 + .../package.json | 1 + .../README.md | 2 - .../README.md | 4 +- .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../package.json | 1 + .../README.md | 2 +- .../package.json | 1 + .../README.md | 2 +- .../package.json | 1 + .../README.md | 2 +- .../package.json | 1 + .../opentelemetry-plugin-react-load/README.md | 4 +- .../package.json | 1 + scripts/verify-readme.js | 82 +++++++++++++++++++ 53 files changed, 171 insertions(+), 15 deletions(-) create mode 100644 scripts/verify-readme.js diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md index 687558b444..ac6e7b1ecb 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md @@ -46,3 +46,19 @@ Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https: | host.type | Value of `instance-type` on Alibaba Cloud | [resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-alibaba-cloud +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-alibaba-cloud.svg diff --git a/detectors/node/opentelemetry-resource-detector-azure/README.md b/detectors/node/opentelemetry-resource-detector-azure/README.md index c900a48663..4b7ff90938 100644 --- a/detectors/node/opentelemetry-resource-detector-azure/README.md +++ b/detectors/node/opentelemetry-resource-detector-azure/README.md @@ -75,3 +75,13 @@ This package implements Semantic Convention [Version 1.19.0](https://github.com/ - For more information on OpenTelemetry, visit: - For more about OpenTelemetry JavaScript: - For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-azure +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-azure.svg diff --git a/detectors/node/opentelemetry-resource-detector-container/README.md b/detectors/node/opentelemetry-resource-detector-container/README.md index f798241a28..fd452420fe 100644 --- a/detectors/node/opentelemetry-resource-detector-container/README.md +++ b/detectors/node/opentelemetry-resource-detector-container/README.md @@ -51,3 +51,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-container +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-container.svg diff --git a/detectors/node/opentelemetry-resource-detector-gcp/README.md b/detectors/node/opentelemetry-resource-detector-gcp/README.md index 5eee1f8820..966ebe5881 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/README.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/README.md @@ -56,10 +56,10 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Apache 2.0 - See [LICENSE][license-url] for more information. -[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata -[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-gcp [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-gcp.svg +[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata +[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview \ No newline at end of file diff --git a/package.json b/package.json index 177c83d77d..f3d5b1ecdc 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "clean": "lerna run clean", "precompile": "tsc --version && npm run version:update", "version:update": "lerna run version:update", + "readme:verify": "lerna run readme:verify", "compile": "lerna run compile", "prewatch": "npm run precompile", "test": "lerna run test", diff --git a/plugins/node/instrumentation-amqplib/package.json b/plugins/node/instrumentation-amqplib/package.json index c26cc76170..a344903f29 100644 --- a/plugins/node/instrumentation-amqplib/package.json +++ b/plugins/node/instrumentation-amqplib/package.json @@ -37,6 +37,7 @@ "test": "nyc ts-mocha -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w", "test:docker:run": "docker run -d --hostname demo-amqplib-rabbit --name amqplib-unittests -p 22221:5672 --env RABBITMQ_DEFAULT_USER=username --env RABBITMQ_DEFAULT_PASS=password rabbitmq:3" }, diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index 2c0c17df13..d23e9d5291 100644 --- a/plugins/node/instrumentation-cucumber/package.json +++ b/plugins/node/instrumentation-cucumber/package.json @@ -16,6 +16,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-fs/package.json b/plugins/node/instrumentation-fs/package.json index 824dfaac4b..3daef55163 100644 --- a/plugins/node/instrumentation-fs/package.json +++ b/plugins/node/instrumentation-fs/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-kafkajs/package.json b/plugins/node/instrumentation-kafkajs/package.json index 52dffe870a..57952f898d 100644 --- a/plugins/node/instrumentation-kafkajs/package.json +++ b/plugins/node/instrumentation-kafkajs/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-lru-memoizer/package.json b/plugins/node/instrumentation-lru-memoizer/package.json index dd3b46a81c..f4942fd0d0 100644 --- a/plugins/node/instrumentation-lru-memoizer/package.json +++ b/plugins/node/instrumentation-lru-memoizer/package.json @@ -16,6 +16,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-mongoose/package.json b/plugins/node/instrumentation-mongoose/package.json index ab2b70d5b5..ee866855ce 100644 --- a/plugins/node/instrumentation-mongoose/package.json +++ b/plugins/node/instrumentation-mongoose/package.json @@ -17,6 +17,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-socket.io/package.json b/plugins/node/instrumentation-socket.io/package.json index 58459c97b6..0ee1f1aaa4 100644 --- a/plugins/node/instrumentation-socket.io/package.json +++ b/plugins/node/instrumentation-socket.io/package.json @@ -16,6 +16,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md index 59543ddb2d..7549cb8dc9 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/README.md @@ -9,10 +9,10 @@ This module provides automatic instrumentation for the [`AWS Lambda`](https://do 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. -This module is currently under active development and not ready for general use. - Compatible with OpenTelemetry JS API and SDK `1.0+`. +This module is currently under active development and not ready for general use. + ## Installation ```bash diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index dd36bec2fc..5bb0475070 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md index dc362c6a29..3f2b90dba1 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/README.md @@ -9,6 +9,8 @@ This module provides automatic instrumentation for the [`aws-sdk` v2](https://do 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Installation ```bash diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json index b0f973354c..9868016ed0 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json @@ -38,6 +38,7 @@ "test": "nyc ts-mocha -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "peerDependencies": { diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/package.json b/plugins/node/opentelemetry-instrumentation-cassandra/package.json index f8fd12f1b4..9b69c968c2 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/package.json +++ b/plugins/node/opentelemetry-instrumentation-cassandra/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-connect/README.md b/plugins/node/opentelemetry-instrumentation-connect/README.md index d16302b84a..2febdbe37b 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/README.md +++ b/plugins/node/opentelemetry-instrumentation-connect/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for the [`connect`](https://githu 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Status | Maturity | [Component Owner](../../../.github/component_owners.yml) | Compatibility | diff --git a/plugins/node/opentelemetry-instrumentation-connect/package.json b/plugins/node/opentelemetry-instrumentation-connect/package.json index 096c7c2717..1571a200c5 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/package.json +++ b/plugins/node/opentelemetry-instrumentation-connect/package.json @@ -15,6 +15,7 @@ "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-dns/README.md b/plugins/node/opentelemetry-instrumentation-dns/README.md index 74d7e2a7bd..7b84e08bef 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/README.md +++ b/plugins/node/opentelemetry-instrumentation-dns/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for the [`dns`](http://nodejs.org 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Status | Maturity | [Component Owner](../../../.github/component_owners.yml) | Compatibility | diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 5549781d25..ccb500731e 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/package.json +++ b/plugins/node/opentelemetry-instrumentation-dns/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index 489873a6d3..a29d5d5d45 100644 --- a/plugins/node/opentelemetry-instrumentation-express/package.json +++ b/plugins/node/opentelemetry-instrumentation-express/package.json @@ -15,6 +15,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-express --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-fastify/README.md b/plugins/node/opentelemetry-instrumentation-fastify/README.md index ffaf255868..8f0e43d3a8 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/README.md +++ b/plugins/node/opentelemetry-instrumentation-fastify/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for the [`fastify`](https://www.f 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Installation This instrumentation relies on HTTP calls to also be instrumented. Make sure you install and enable both, otherwise you will have spans that are not connected with each other. diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index 056185aab4..414ff7cdc0 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/package.json +++ b/plugins/node/opentelemetry-instrumentation-fastify/package.json @@ -15,6 +15,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "prewatch": "npm run precompile", "watch": "tsc -w" }, diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 47178ec699..c5adbc5d31 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-generic-pool --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-graphql/README.md b/plugins/node/opentelemetry-instrumentation-graphql/README.md index 9344e8ed19..16136cdcd0 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/README.md +++ b/plugins/node/opentelemetry-instrumentation-graphql/README.md @@ -9,10 +9,10 @@ This module provides automatic instrumentation and tracing for GraphQL in Node.j 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. -*Note*: graphql plugin instruments graphql directly. it should work with any package that wraps the graphql package (e.g apollo). - Compatible with OpenTelemetry JS API and SDK `1.0+`. +*Note*: graphql plugin instruments graphql directly. it should work with any package that wraps the graphql package (e.g apollo). + ## Installation ```shell script @@ -131,7 +131,7 @@ This package does not currently generate any attributes from semantic convention Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-graphql [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-graphql.svg diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 30bcec5c80..9230f01c8d 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -17,6 +17,7 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-hapi/README.md b/plugins/node/opentelemetry-instrumentation-hapi/README.md index c9b4062ea5..aed12dd44c 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/README.md +++ b/plugins/node/opentelemetry-instrumentation-hapi/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for the [Hapi Framework](https:// 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Status | Maturity | [Component Owner](../../../.github/component_owners.yml) | Compatibility | diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index 497cedd37d..41c3d81ae0 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/package.json +++ b/plugins/node/opentelemetry-instrumentation-hapi/package.json @@ -15,6 +15,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-hapi --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index cf3760eeb6..1633f0f791 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/package.json +++ b/plugins/node/opentelemetry-instrumentation-ioredis/package.json @@ -18,6 +18,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-ioredis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-knex/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 7705439ef1..737cfc3aa0 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/package.json +++ b/plugins/node/opentelemetry-instrumentation-knex/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-knex --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-koa/README.md b/plugins/node/opentelemetry-instrumentation-koa/README.md index aee8051ccd..a896587f24 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/README.md +++ b/plugins/node/opentelemetry-instrumentation-koa/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for the [Koa](https://github.com/ 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. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Status | Maturity | [Component Owner](../../../.github/component_owners.yml) | Compatibility | diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index bd5f6c13f1..1369a18ec8 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/package.json +++ b/plugins/node/opentelemetry-instrumentation-koa/package.json @@ -15,6 +15,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-koa --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 6c78e98aa8..65b06fe56c 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -19,6 +19,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mongodb --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md index ac24133fa3..ba54f30230 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/README.md @@ -83,6 +83,4 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-nestjs-core [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-nestjs-core.svg -[pkg-repo-url]: https://github.com/nestjs/nest -[pkg-npm-url]: https://www.npmjs.com/package/@nestjs/core [pkg-web-url]: https://nestjs.com/ diff --git a/plugins/node/opentelemetry-instrumentation-net/README.md b/plugins/node/opentelemetry-instrumentation-net/README.md index 60fc7ca98a..aab55e0e6e 100644 --- a/plugins/node/opentelemetry-instrumentation-net/README.md +++ b/plugins/node/opentelemetry-instrumentation-net/README.md @@ -7,10 +7,10 @@ This module provides automatic instrumentation for the [`net`](http://nodejs.org 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. -Supports both TCP and IPC connections. - Compatible with OpenTelemetry JS API and SDK `1.0+`. +Supports both TCP and IPC connections. + ## Installation ```bash diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index aa8a79ae53..7d0b3c526f 100644 --- a/plugins/node/opentelemetry-instrumentation-net/package.json +++ b/plugins/node/opentelemetry-instrumentation-net/package.json @@ -15,6 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index 18c0de2ca1..05f6f4e4df 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -20,6 +20,7 @@ "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", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index 49b263b9ca..d4d6bf1c64 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/package.json +++ b/plugins/node/opentelemetry-instrumentation-pino/package.json @@ -16,6 +16,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index 8aa653b1af..2c0692a1e4 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis-4/package.json @@ -20,6 +20,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis-4 --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 89560460e9..4c9d01fc1c 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis/package.json @@ -20,6 +20,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index 54b5f1ec7a..c9f7cc6224 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/package.json +++ b/plugins/node/opentelemetry-instrumentation-restify/package.json @@ -17,6 +17,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-router/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index d9b5c2e621..fc41cc9a00 100644 --- a/plugins/node/opentelemetry-instrumentation-router/package.json +++ b/plugins/node/opentelemetry-instrumentation-router/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-router --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 54d31f1d8c..1b92909ebb 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -16,6 +16,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/web/opentelemetry-instrumentation-document-load/README.md b/plugins/web/opentelemetry-instrumentation-document-load/README.md index 3d87e40398..b1f2f4b2ef 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/README.md +++ b/plugins/web/opentelemetry-instrumentation-document-load/README.md @@ -133,7 +133,7 @@ Attributes collected: Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-document-load [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-document-load.svg diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index 75ecc372e0..90a57c5f50 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/package.json +++ b/plugins/web/opentelemetry-instrumentation-document-load/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-document-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "wtr --watch", diff --git a/plugins/web/opentelemetry-instrumentation-long-task/README.md b/plugins/web/opentelemetry-instrumentation-long-task/README.md index 5f15447e58..fd3a3df856 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/README.md +++ b/plugins/web/opentelemetry-instrumentation-long-task/README.md @@ -69,7 +69,7 @@ longtaskInstrumentationConfig = { Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-long-task [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-long-task.svg diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index 3b1ff6e500..0a3578b325 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/package.json +++ b/plugins/web/opentelemetry-instrumentation-long-task/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/README.md b/plugins/web/opentelemetry-instrumentation-user-interaction/README.md index c72a693fc8..9823e3f068 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/README.md +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/README.md @@ -163,7 +163,7 @@ registerInstrumentations({ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-user-interaction [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-user-interaction.svg diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index f7236de922..c4706a73d5 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/plugins/web/opentelemetry-plugin-react-load/README.md b/plugins/web/opentelemetry-plugin-react-load/README.md index 76155f67b4..ab822d1955 100644 --- a/plugins/web/opentelemetry-plugin-react-load/README.md +++ b/plugins/web/opentelemetry-plugin-react-load/README.md @@ -7,6 +7,8 @@ This module provides automatic instrumentation for *React lifecycles* for Web ap If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-web`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-web) bundle with [`@opentelemetry/sdk-trace-web`](https://www.npmjs.com/package/@opentelemetry/sdk-trace-web) for the most seamless instrumentation experience. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ## Status | Maturity | [Component Owner](../../../.github/component_owners.yml) | Compatibility | @@ -54,7 +56,7 @@ This package does not currently generate any attributes from semantic convention Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/plugin-react-load [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fplugin-react-load.svg diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index 3994d17b54..9a509a9d6b 100644 --- a/plugins/web/opentelemetry-plugin-react-load/package.json +++ b/plugins/web/opentelemetry-plugin-react-load/package.json @@ -14,6 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/plugin-react-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", + "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/scripts/verify-readme.js b/scripts/verify-readme.js new file mode 100644 index 0000000000..28ac24a0bb --- /dev/null +++ b/scripts/verify-readme.js @@ -0,0 +1,82 @@ +const fs = require('fs'); +const path = require('path'); + +const appRoot = process.cwd(); + +// identify if it's node or web +const isNode = appRoot.includes('node'); +const isWeb = appRoot.includes('web'); + +// extract info from package.json +const packageJsonUrl = path.resolve(`${appRoot}/package.json`); +const pjson = require(packageJsonUrl); +const instrumentationPackageName = pjson.name; + +// extract info from README.md +const currentReadmeContent = fs.readFileSync( + path.resolve(`${appRoot}/README.md`), + 'utf8' +); + +// make sure the footer is present + +const footerToVerify = `## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +## License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[npm-url]: https://www.npmjs.com/package/${instrumentationPackageName} +[npm-img]: https://badge.fury.io/js/${encodeURIComponent(instrumentationPackageName)}.svg +`; + +if (!currentReadmeContent.includes(footerToVerify)) { + throw new Error( + `README.md footer is not valid. Please add the following text to the README.md file:\n\n${footerToVerify}` + ); +} + +// make sure we have badges at the top + +const badgesToVerify = `[![NPM Published Version][npm-img]][npm-url] +[![Apache License][license-image]][license-image] +`; + +if (!currentReadmeContent.includes(badgesToVerify)) { + throw new Error( + `README.md badges are not valid. Please add the following text to the README.md file:\n\n${badgesToVerify}` + ); +} + +if (isNode) { + const distText = `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. + +Compatible with OpenTelemetry JS API and SDK \`1.0+\`. +` + + if (!currentReadmeContent.includes(distText)) { + throw new Error( + `README.md dist text is not valid. Please add the following text to the README.md file:\n\n${distText}` + ); + } +} else if (isWeb) { + const distText = `If total installation size is not constrained, it is recommended to use the [\`@opentelemetry/auto-instrumentations-web\`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-web) bundle with [\`@opentelemetry/sdk-trace-web\`](https://www.npmjs.com/package/@opentelemetry/sdk-trace-web) for the most seamless instrumentation experience. + +Compatible with OpenTelemetry JS API and SDK \`1.0+\`. +`; + + if (!currentReadmeContent.includes(distText)) { + throw new Error( + `README.md dist text is not valid. Please add the following text to the README.md file:\n\n${distText}` + ); + } +} + +console.log('README.md is verified!'); From 284c8da162718614cbbd79600e0fec17b7559ebb Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Sat, 25 May 2024 10:45:35 +0300 Subject: [PATCH 2/9] ci: add verify readmes to lint workflow --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0622459ce0..189e646410 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,3 +26,6 @@ jobs: - run: npm ci - name: Lint run: npm run lint + + - name: Verify READMEs + run: npm run readme:verify From b180d280afb535f92ca368606eb986248ba0b9fa Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Sat, 25 May 2024 10:51:30 +0300 Subject: [PATCH 3/9] chore: md lint --- detectors/node/opentelemetry-resource-detector-gcp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detectors/node/opentelemetry-resource-detector-gcp/README.md b/detectors/node/opentelemetry-resource-detector-gcp/README.md index 966ebe5881..3026650770 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/README.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/README.md @@ -62,4 +62,4 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-gcp [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-gcp.svg [`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata -[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview \ No newline at end of file +[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview From f53d6307d456fe3bd7722e7be8dc1c9aa482dc3b Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 19 Jun 2024 14:51:07 +0300 Subject: [PATCH 4/9] fix: ci lint step --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9248cd446d..4988e40ba2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,4 +20,4 @@ jobs: run: | npm run lint npm run lint:markdown - run: npm run readme:verify + npm run readme:verify From 843d5b968f704da3ebca70130124b00d84dc6964 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 19 Jun 2024 15:08:55 +0300 Subject: [PATCH 5/9] revert: README changes to detectors --- .../README.md | 16 ---------------- .../README.md | 4 ++-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md index ac6e7b1ecb..687558b444 100644 --- a/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md +++ b/detectors/node/opentelemetry-resource-detector-alibaba-cloud/README.md @@ -46,19 +46,3 @@ Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https: | host.type | Value of `instance-type` on Alibaba Cloud | [resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions - -## Useful links - -- For more information on OpenTelemetry, visit: -- For more about OpenTelemetry JavaScript: -- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] - -## License - -Apache 2.0 - See [LICENSE][license-url] for more information. - -[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions -[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE -[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-alibaba-cloud -[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-alibaba-cloud.svg diff --git a/detectors/node/opentelemetry-resource-detector-gcp/README.md b/detectors/node/opentelemetry-resource-detector-gcp/README.md index 3026650770..5eee1f8820 100644 --- a/detectors/node/opentelemetry-resource-detector-gcp/README.md +++ b/detectors/node/opentelemetry-resource-detector-gcp/README.md @@ -56,10 +56,10 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Apache 2.0 - See [LICENSE][license-url] for more information. +[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata +[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat [npm-url]: https://www.npmjs.com/package/@opentelemetry/resource-detector-gcp [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fresource-detector-gcp.svg -[`gcp-metadata`]: https://www.npmjs.com/package/gcp-metadata -[GCP Metadata Documentation]: https://cloud.google.com/compute/docs/metadata/overview From 10f871650ddad393eaa840349bc3767ba1c54b03 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 19 Jun 2024 15:20:37 +0300 Subject: [PATCH 6/9] refactor: rename verify-readme to lint-readme --- .github/workflows/lint.yml | 2 +- package.json | 2 +- plugins/node/instrumentation-amqplib/package.json | 2 +- plugins/node/instrumentation-cucumber/package.json | 2 +- plugins/node/instrumentation-fs/package.json | 2 +- plugins/node/instrumentation-kafkajs/package.json | 2 +- plugins/node/instrumentation-lru-memoizer/package.json | 2 +- plugins/node/instrumentation-mongoose/package.json | 2 +- plugins/node/instrumentation-socket.io/package.json | 2 +- .../node/opentelemetry-instrumentation-aws-lambda/package.json | 2 +- plugins/node/opentelemetry-instrumentation-aws-sdk/package.json | 2 +- .../node/opentelemetry-instrumentation-cassandra/package.json | 2 +- plugins/node/opentelemetry-instrumentation-connect/package.json | 2 +- plugins/node/opentelemetry-instrumentation-dns/package.json | 2 +- plugins/node/opentelemetry-instrumentation-express/package.json | 2 +- plugins/node/opentelemetry-instrumentation-fastify/package.json | 2 +- .../opentelemetry-instrumentation-generic-pool/package.json | 2 +- plugins/node/opentelemetry-instrumentation-graphql/package.json | 2 +- plugins/node/opentelemetry-instrumentation-hapi/package.json | 2 +- plugins/node/opentelemetry-instrumentation-ioredis/package.json | 2 +- plugins/node/opentelemetry-instrumentation-knex/package.json | 2 +- plugins/node/opentelemetry-instrumentation-koa/package.json | 2 +- plugins/node/opentelemetry-instrumentation-mongodb/package.json | 2 +- plugins/node/opentelemetry-instrumentation-net/package.json | 2 +- plugins/node/opentelemetry-instrumentation-pg/package.json | 2 +- plugins/node/opentelemetry-instrumentation-pino/package.json | 2 +- plugins/node/opentelemetry-instrumentation-redis-4/package.json | 2 +- plugins/node/opentelemetry-instrumentation-redis/package.json | 2 +- plugins/node/opentelemetry-instrumentation-restify/package.json | 2 +- plugins/node/opentelemetry-instrumentation-router/package.json | 2 +- plugins/node/opentelemetry-instrumentation-winston/package.json | 2 +- .../opentelemetry-instrumentation-document-load/package.json | 2 +- .../web/opentelemetry-instrumentation-long-task/package.json | 2 +- .../opentelemetry-instrumentation-user-interaction/package.json | 2 +- plugins/web/opentelemetry-plugin-react-load/package.json | 2 +- scripts/{verify-readme.js => lint-readme.js} | 0 36 files changed, 35 insertions(+), 35 deletions(-) rename scripts/{verify-readme.js => lint-readme.js} (100%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4988e40ba2..fdf521d3e3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,4 +20,4 @@ jobs: run: | npm run lint npm run lint:markdown - npm run readme:verify + npm run lint:readme diff --git a/package.json b/package.json index 2e45579fd6..f0daf35bfc 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "clean": "lerna run clean", "precompile": "tsc --version && npm run version:update", "version:update": "lerna run version:update", - "readme:verify": "lerna run readme:verify", + "lint:readme": "lerna run lint:readme", "compile": "lerna run compile", "prewatch": "npm run precompile", "test": "lerna run test", diff --git a/plugins/node/instrumentation-amqplib/package.json b/plugins/node/instrumentation-amqplib/package.json index ee0358fa76..689a7f2dfc 100644 --- a/plugins/node/instrumentation-amqplib/package.json +++ b/plugins/node/instrumentation-amqplib/package.json @@ -30,6 +30,7 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-amqplib --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", @@ -37,7 +38,6 @@ "test": "nyc ts-mocha -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w", "test:docker:run": "docker run -d --hostname demo-amqplib-rabbit --name amqplib-unittests -p 22221:5672 --env RABBITMQ_DEFAULT_USER=username --env RABBITMQ_DEFAULT_PASS=password rabbitmq:3" }, diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index 8d8751f012..ec0afafdd6 100644 --- a/plugins/node/instrumentation-cucumber/package.json +++ b/plugins/node/instrumentation-cucumber/package.json @@ -12,11 +12,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-cucumber --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-fs/package.json b/plugins/node/instrumentation-fs/package.json index 9ad65bb6ba..51cb8ef836 100644 --- a/plugins/node/instrumentation-fs/package.json +++ b/plugins/node/instrumentation-fs/package.json @@ -11,11 +11,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-fs --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-kafkajs/package.json b/plugins/node/instrumentation-kafkajs/package.json index 85960c1a18..7b48870d0c 100644 --- a/plugins/node/instrumentation-kafkajs/package.json +++ b/plugins/node/instrumentation-kafkajs/package.json @@ -11,11 +11,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-kafkajs --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-lru-memoizer/package.json b/plugins/node/instrumentation-lru-memoizer/package.json index a606c40d26..464fd99fdc 100644 --- a/plugins/node/instrumentation-lru-memoizer/package.json +++ b/plugins/node/instrumentation-lru-memoizer/package.json @@ -12,11 +12,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-lru-memoizer --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-mongoose/package.json b/plugins/node/instrumentation-mongoose/package.json index 2a835e464b..42c1828823 100644 --- a/plugins/node/instrumentation-mongoose/package.json +++ b/plugins/node/instrumentation-mongoose/package.json @@ -13,11 +13,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mongoose --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/instrumentation-socket.io/package.json b/plugins/node/instrumentation-socket.io/package.json index f99090f427..96aae23247 100644 --- a/plugins/node/instrumentation-socket.io/package.json +++ b/plugins/node/instrumentation-socket.io/package.json @@ -12,11 +12,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-socket.io --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 5ffab5db10..02b86d9a9b 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -11,11 +11,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-aws-lambda --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json index 16ae58bc04..ea6d8a9fb0 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/package.json @@ -31,6 +31,7 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-aws-sdk --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", @@ -38,7 +39,6 @@ "test": "nyc ts-mocha -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "peerDependencies": { diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/package.json b/plugins/node/opentelemetry-instrumentation-cassandra/package.json index 8297eab839..3668eee72a 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/package.json +++ b/plugins/node/opentelemetry-instrumentation-cassandra/package.json @@ -11,11 +11,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-cassandra-driver --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-connect/package.json b/plugins/node/opentelemetry-instrumentation-connect/package.json index ff1c9e98b2..6c7acae01e 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/package.json +++ b/plugins/node/opentelemetry-instrumentation-connect/package.json @@ -10,12 +10,12 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-connect --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index b88ce7f3c6..f0d0cdf4ef 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/package.json +++ b/plugins/node/opentelemetry-instrumentation-dns/package.json @@ -15,7 +15,7 @@ "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", + "lint:readme": "node ../../../scripts/lint-readme", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index 51b773a115..c969dd0520 100644 --- a/plugins/node/opentelemetry-instrumentation-express/package.json +++ b/plugins/node/opentelemetry-instrumentation-express/package.json @@ -12,10 +12,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-express --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-fastify/package.json b/plugins/node/opentelemetry-instrumentation-fastify/package.json index 431ea0609f..58476b30c5 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/package.json +++ b/plugins/node/opentelemetry-instrumentation-fastify/package.json @@ -10,12 +10,12 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-fastify --include-dependencies", "prepublishOnly": "npm run compile", "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "prewatch": "npm run precompile", "watch": "tsc -w" }, diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 1f826810ff..b843b0e15d 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json @@ -11,10 +11,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-generic-pool --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index 022af38be1..441be6b47e 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -10,6 +10,7 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-graphql --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", @@ -17,7 +18,6 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index 3ff8c8967d..05800e470b 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/package.json +++ b/plugins/node/opentelemetry-instrumentation-hapi/package.json @@ -12,10 +12,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-hapi --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index 47bcd3515f..ab66240a02 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/package.json +++ b/plugins/node/opentelemetry-instrumentation-ioredis/package.json @@ -15,10 +15,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-ioredis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-knex/package.json b/plugins/node/opentelemetry-instrumentation-knex/package.json index 8cb7467fab..78ec339bd0 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/package.json +++ b/plugins/node/opentelemetry-instrumentation-knex/package.json @@ -14,7 +14,7 @@ "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-knex --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", + "lint:readme": "node ../../../scripts/lint-readme", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index 770d0a4fc4..dd6f4e4879 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/package.json +++ b/plugins/node/opentelemetry-instrumentation-koa/package.json @@ -12,10 +12,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-koa --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 47520db495..1621791ec9 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -16,10 +16,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-mongodb --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-net/package.json b/plugins/node/opentelemetry-instrumentation-net/package.json index 7830c64e04..6f221dcf7b 100644 --- a/plugins/node/opentelemetry-instrumentation-net/package.json +++ b/plugins/node/opentelemetry-instrumentation-net/package.json @@ -11,11 +11,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-net --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index 842ec8e988..ec8d1f81aa 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -10,6 +10,7 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-pg --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", @@ -20,7 +21,6 @@ "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", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index 4a209db6f4..12f2485424 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/package.json +++ b/plugins/node/opentelemetry-instrumentation-pino/package.json @@ -12,11 +12,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-pino --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/package.json b/plugins/node/opentelemetry-instrumentation-redis-4/package.json index 3baaeeff97..3f440ab849 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis-4/package.json @@ -17,10 +17,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis-4 --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index e4215e8432..f94dc6f9cf 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis/package.json @@ -17,10 +17,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-redis --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile" }, diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index 46d64efab0..de1487c692 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/package.json +++ b/plugins/node/opentelemetry-instrumentation-restify/package.json @@ -10,6 +10,7 @@ "compile": "tsc -p .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-restify --include-dependencies", "prepublishOnly": "npm run compile", "prewatch": "npm run precompile", @@ -17,7 +18,6 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'", "test-all-versions": "tav", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "watch": "tsc -w" }, "keywords": [ diff --git a/plugins/node/opentelemetry-instrumentation-router/package.json b/plugins/node/opentelemetry-instrumentation-router/package.json index 13c8c4e957..ed280aa09a 100644 --- a/plugins/node/opentelemetry-instrumentation-router/package.json +++ b/plugins/node/opentelemetry-instrumentation-router/package.json @@ -11,10 +11,10 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-router --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p .", "prepublishOnly": "npm run compile", "watch": "tsc -w" diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 28c78fcb4b..b991ee2955 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -12,11 +12,11 @@ "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-winston --include-dependencies", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc -p ." }, "keywords": [ diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index 9523732c7e..60dc5f6009 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/package.json +++ b/plugins/web/opentelemetry-instrumentation-document-load/package.json @@ -11,10 +11,10 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-document-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "wtr --watch", diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index 303966760c..150eb5940c 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/package.json +++ b/plugins/web/opentelemetry-instrumentation-long-task/package.json @@ -10,11 +10,11 @@ "scripts": { "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index ac9c4a336c..642570faaf 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json @@ -10,11 +10,11 @@ "scripts": { "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-user-interaction --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index 50d0235aa8..2c2e616eed 100644 --- a/plugins/web/opentelemetry-plugin-react-load/package.json +++ b/plugins/web/opentelemetry-plugin-react-load/package.json @@ -11,10 +11,10 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", + "lint:readme": "node ../../../scripts/lint-readme.js", "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/plugin-react-load --include-dependencies", "prewatch": "npm run precompile", "version:update": "node ../../../scripts/version-update.js", - "readme:verify": "node ../../../scripts/verify-readme.js", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/scripts/verify-readme.js b/scripts/lint-readme.js similarity index 100% rename from scripts/verify-readme.js rename to scripts/lint-readme.js From 816d8543c1b6ebd519adf087d9b98fd4205ad907 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 19 Jun 2024 15:23:31 +0300 Subject: [PATCH 7/9] fix: remove console log on success --- scripts/lint-readme.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/lint-readme.js b/scripts/lint-readme.js index 28ac24a0bb..21c5693e40 100644 --- a/scripts/lint-readme.js +++ b/scripts/lint-readme.js @@ -78,5 +78,3 @@ Compatible with OpenTelemetry JS API and SDK \`1.0+\`. ); } } - -console.log('README.md is verified!'); From 226dda7ad7a8fd3173961ce16af20e3440d79b0b Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 19 Jun 2024 15:45:58 +0300 Subject: [PATCH 8/9] refactor: use auto instrumentations deps to lable node or web --- scripts/lint-readme.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/lint-readme.js b/scripts/lint-readme.js index 21c5693e40..970139f737 100644 --- a/scripts/lint-readme.js +++ b/scripts/lint-readme.js @@ -1,20 +1,24 @@ const fs = require('fs'); const path = require('path'); -const appRoot = process.cwd(); +const packageRoot = process.cwd(); +const monorepoRoot = path.resolve(`${packageRoot}/../../..`); -// identify if it's node or web -const isNode = appRoot.includes('node'); -const isWeb = appRoot.includes('web'); +const autoInstrumentationNodeDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-node/package.json`).dependencies; +const autoInstrumentationWebDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-web/package.json`).dependencies; // extract info from package.json -const packageJsonUrl = path.resolve(`${appRoot}/package.json`); +const packageJsonUrl = path.resolve(`${packageRoot}/package.json`); const pjson = require(packageJsonUrl); const instrumentationPackageName = pjson.name; +// identify if it's node or web +const isNode = instrumentationPackageName in autoInstrumentationNodeDeps; +const isWeb = instrumentationPackageName in autoInstrumentationWebDeps; + // extract info from README.md const currentReadmeContent = fs.readFileSync( - path.resolve(`${appRoot}/README.md`), + path.resolve(`${packageRoot}/README.md`), 'utf8' ); From 7f5366ca059e30407fc66dc4a25ecc7b54204de8 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Thu, 20 Jun 2024 09:49:08 +0300 Subject: [PATCH 9/9] Update scripts/lint-readme.js Co-authored-by: Trent Mick --- scripts/lint-readme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lint-readme.js b/scripts/lint-readme.js index 970139f737..78dd0d4b5e 100644 --- a/scripts/lint-readme.js +++ b/scripts/lint-readme.js @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); const packageRoot = process.cwd(); -const monorepoRoot = path.resolve(`${packageRoot}/../../..`); +const monorepoRoot = path.resolve(__dirname, '..'); const autoInstrumentationNodeDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-node/package.json`).dependencies; const autoInstrumentationWebDeps = require(`${monorepoRoot}/metapackages/auto-instrumentations-web/package.json`).dependencies;