Next.js Discord

Discord Forum

await connection() expected when using OpenTelemetry instrumentation

Unanswered
Rampur Greyhound posted this in #help-forum
Open in Discord
Rampur GreyhoundOP
How can I fix this error? As soon as I register my OpenTelemetry instrumentation hook, I keep getting this error on every page.

[ Server ] Error: Route "/test" used Math.random() outside of "use cache" and without explicitly calling await connection() beforehand. See more info here: https://nextjs.org/docs/messages/next-prerender-random

3 Replies