@fastify/[email protected] fails with @opentelemetry/[email protected] when bundled:
TypeError: Cannot set property logger of #<InstrumentationAbstract> which has only a getter
npm install
# Reproduce the error (builds with esbuild, simulates broken class field handling)
npm run build && npm run start
# Compare with native Node.js (works fine)
npm run start:native=== npm run build && npm run start ===
Bundled with esbuild
Removed __publicField(this, "logger", null) to simulate broken bundler
ERROR: Cannot set property logger of #<InstrumentationAbstract> which has only a getter
=== npm run start:native ===
SUCCESS: FastifyOtelInstrumentation created