Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add instrumentation metadata to package.json #2292

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-amqplib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
"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"
},
"opentelemetry": {
"components": [
{
"name": "AmqplibInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-cucumber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "CucumberInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"cucumber",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-dataloader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"test-all-versions": "tav",
"version:update": "node ../../../scripts/version-update.js"
},
"opentelemetry": {
"components": [
{
"name": "DataloaderInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"dataloader",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-fs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "FsInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"fs",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-kafkajs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "KafkajsInstrumentation",
Copy link
Contributor

@trentm trentm Jun 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hesitant on this change.

  • It adds a bit of maintenance. For example, this KafkajsInstrumentation is out of sync with the code which has a different capitalization KafkaJsInstrumentation.
  • Given this being broken up into an array of components, I understand the desire to have a "name" field for each component. However, that information isn't being used anywhere, so the maintenance of having something that can get out of sync with the code is unfortunate. Do you have a particular use case for the enumeration of these named components? Perhaps some specifics around the "OpenTelemetry control planes" or "Enhancements for UIs" mentioned in #4725 would help.
  • The use of the "plaforms" field is (at least currently) only in scripts/lint-readme.js. However, that lint usage of isNode, isWeb is used for adding a README section about inclusion in auto-instrumentations-node or -web. Isn't the current lint-readme.js querying of auto-instrumentations-node/-web the more accurate information? Recent discussion about some new instrumentations targetting "web" were not going to be included in auto-instrumentations-web, IIRC.

What if we added just this?

"opentelemetry": {
  "targetPlatforms": ["node"]
},

Granted that a package could export components, some of which target web and some of which target node, but I wouldn't think it likely.

(Another key that might be useful is "stability" or "stabilityLevel" using the values defined at https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/CONTRIBUTING.md#component-lifecycle)

At the least, it would be helpful to have a doc section somewhere (GUIDELINES.md seems okay, but currently is scoped on being an instrumentation implementation guide) that explains what this "opentelemetry" package.json key is about (stability, schema) when people ask.

"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"kafkajs",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-lru-memoizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "LruMemoizerInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"lru-memoizer",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-mongoose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "MongooseInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"mongodb",
"mongoose",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-runtime-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"version:update": "node ../../../scripts/version-update.js"
},
"opentelemetry": {
"components": [
{
"name": "RuntimeNodeInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-socket.io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "SocketIoInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"socket.io",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-tedious/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"test-all-versions": "tav",
"version:update": "node ../../../scripts/version-update.js"
},
"opentelemetry": {
"components": [
{
"name": "TediousInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"instrumentation",
"microsoft",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/instrumentation-undici/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"prewatch": "npm run precompile",
"version:update": "node ../../../scripts/version-update.js"
},
"opentelemetry": {
"components": [
{
"name": "UndiciInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"opentelemetry",
"fetch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "AwsLambdaInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"aws-lambda",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-aws-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
"version:update": "node ../../../scripts/version-update.js",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "AwsInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-bunyan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"test-all-versions": "tav",
"version:update": "node ../../../scripts/version-update.js"
},
"opentelemetry": {
"components": [
{
"name": "BunyanInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"bunyan",
"instrumentation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"version:update": "node ../../../scripts/version-update.js",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "CassandraDriverInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"cassandra-driver",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"version:update": "node ../../../scripts/version-update.js",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "ConnectInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"connect",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
"lint:readme": "node ../../../scripts/lint-readme",
"compile": "tsc -p ."
},
"opentelemetry": {
"components": [
{
"name": "DnsInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"dns",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
"prepublishOnly": "npm run compile",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "ExpressInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"express",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"prewatch": "npm run precompile",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "FastifyInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"fastify",
"instrumentation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"prepublishOnly": "npm run compile",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "GenericPoolInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"generic-pool",
"instrumentation",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
"version:update": "node ../../../scripts/version-update.js",
"watch": "tsc -w"
},
"opentelemetry": {
"components": [
{
"name": "GraphQLInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"graphql",
"metrics",
Expand Down
11 changes: 11 additions & 0 deletions plugins/node/opentelemetry-instrumentation-hapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"compile": "tsc -p .",
"prepublishOnly": "npm run compile"
},
"opentelemetry": {
"components": [
{
"name": "HapiInstrumentation",
"type": "instrumentation",
"platforms": [
"node"
]
}
]
},
"keywords": [
"hapi",
"instrumentation",
Expand Down
Loading