-
Notifications
You must be signed in to change notification settings - Fork 586
Description
This is a meta issue to coordinate doing a first pass at ECMAScript module (ESM) support and a test for every node.js instrumentation. (This is about working with the import-in-the-middle
-based hook so is not relevant to browser instrumentations.) I'm not necessarily volunteering to do all these :), but I'll certainly help.
Hopefully this can also be useful for support/help requests for why instrumentation might not be working for ESM-using code. If the module/instrumentation in question is not checked off here, then ESM instrumentation is not expected to work (it might be luck).
- instrumentation-grpc (core repo)
- instrumentation-http (core repo, support + test)
- instrumentation-amqplib
- instrumentation-cucumber
- instrumentation-dataloader (support)
- instrumentation-fs
- instrumentation-lru-memoizer
- instrumentation-mongoose (fix: instrumentation of ESM-imported mongoose #2793)
- instrumentation-socket.io
- instrumentation-tedious
- instrumentation-aws-lambda (support: Fix wrapping ESM files with absolute path opentelemetry-js#5094 and feat(instrumentation-aws-lambda): take care of ESM based (
.mjs
) handlers #2508, missing test) - instrumentation-aws-sdk
- instrumentation-bunyan
- instrumentation-cassandra
- instrumentation-connect
- instrumentation-dns
- instrumentation-express (test)
- instrumentation-fastify (test; there is an ESM limitation, see below)
- instrumentation-generic-pool
- instrumentation-graphql
- instrumentation-hapi (support + test)
- instrumentation-ioredis (support, test)
- instrumentation-knex
- instrumentation-koa (support + test)
- instrumentation-memcached
- instrumentation-mongodb
- instrumentation-mysql
- instrumentation-mysql2
- instrumentation-nestjs-core
- instrumentation-net
- instrumentation-pg (support, test, pg-pool fix)
- instrumentation-pino (support, test was accidentally partially removed, so need to restore that, test re-added)
- instrumentation-redis
- instrumentation-redis-4
- instrumentation-restify
- instrumentation-router
- instrumentation-winston
dev notes
Run the following to show which (contrib-repo) instrumentations have an ESM-related test.
This shows usage of the required experimental-loader hook to support hooking ESM modules.
rg hook.mjs -g '*.test.*'
Guide on adding ESM support and an ESM test to an instrumentation
TODO(trentm)
- feat(test-utils): runTestFixture utility for running out-of-process tests #1735 added
runTestFixture