-
Notifications
You must be signed in to change notification settings - Fork 615
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds:reproducerThis bug/feature is in need of a minimal reproducerThis bug/feature is in need of a minimal reproducerpkg:instrumentation-expresstriage
Description
What version of OpenTelemetry are you using?
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.55.0",
"@opentelemetry/instrumentation": "^0.55.0",
"@opentelemetry/instrumentation-aws-sdk": "^0.47.0",
"@opentelemetry/instrumentation-dns": "^0.41.0",
"@opentelemetry/instrumentation-express": "^0.45.0",
"@opentelemetry/instrumentation-fs": "^0.17.0",
"@opentelemetry/instrumentation-http": "^0.55.0",
"@opentelemetry/instrumentation-ioredis": "^0.45.0",
"@opentelemetry/instrumentation-mongodb": "^0.49.0",
"@opentelemetry/instrumentation-nestjs-core": "^0.42.0",
"@opentelemetry/instrumentation-net": "^0.41.0",
"@opentelemetry/resources": "^1.28.0",
"@opentelemetry/sdk-metrics": "^1.28.0",
"@opentelemetry/sdk-node": "^0.55.0",
"@opentelemetry/semantic-conventions": "^1.28.0"
What version of Node are you using?
20.12.2
What did you do?
I enabled OpenTelemetry and the express instrumentation doesn't patch the package. All other packages work properly.
What did you expect to see?
@opentelemetry/instrumentation-express Applying instrumentation patch for module on require hook
in the debug log
What did you see instead?
Nothing. Express didn't get patched at all.
Additional context
The project is in ESM.
It should happen on line https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts#L201
Here's the following list of the _onRequire calls with module.name and name. For other packages, there's some with name being the same as module.name.
module.name express
name express/lib/router/layer.js
module.name express
name express/lib/router/route.js
module.name express
name express/lib/router/index.js
module.name express
name express/lib/middleware/init.js
module.name express
name express/lib/middleware/query.js
module.name express
name express/lib/view.js
module.name express
name express/lib/utils.js
module.name express
name express/lib/application.js
module.name express
name express/lib/request.js
module.name express
name express/lib/response.js
module.name express
name express/lib/express.js
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds:reproducerThis bug/feature is in need of a minimal reproducerThis bug/feature is in need of a minimal reproducerpkg:instrumentation-expresstriage