Next.js Discord

Discord Forum

Unrecognized key(s) in object: 'instrumentationHooks' at "experimental"

Answered
Channel catfish posted this in #help-forum
Open in Discord
Channel catfishOP
Next version: 14.1.0
When running dev server (next dev --turbo) I receive this error message "Unrecognized key(s) in object: 'instrumentationHooks' at "experimental""

I am trying to setup OpenTelemetry through instrumentation.ts and have followed the official doco to set the instrumentationHooks flag to true in next.config.js

The consequence of this error is that the register function in instrumentation.ts does not fire
Answered by Channel catfish
should be instrumentationHook not instrumentationHooks
View full answer

1 Reply

Channel catfishOP
should be instrumentationHook not instrumentationHooks
Answer