When running an ESM node app, OpenTelemetry HttpInstrumentation
does not create spans for http.get
calls (from node:http
). This works in CJS apps but doesn't in ESM.
- run
npm install
- run
npm run start:cjs
to observehttp.get
call span being printed to console - run
npm run start:esm
to observehttp.get
call span NOT being printed to console - uncomment
http.request
call in both,esm
andcjs
app.js
files to observe that both start a span.