Fastify instrumentation not working for named import for ESM #2253
Labels
bug
Something isn't working
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
What version of OpenTelemetry are you using?
@opentelemetry/instrumentation-fastify
0.36.1
What version of Node are you using?
v18.19
What did you do?
opentelemetry.mjs
:app.mjs
with named import:app.mjs
with default import:ran with
node --import ./opentelemetry.mjs app.mjs
What did you expect to see?
The named export of
fastify
to be correctly instrumented (isWrapped(app.addHook)
to returntrue
), like the second instance ofapp.mjs
with the default import of fastify.What did you see instead?
fastify was not instrumented correctly,
isWrapped(app.addHook)
returnedfalse
.Additional context
First came up in our SDK: getsentry/sentry-javascript#12119
The text was updated successfully, but these errors were encountered: