Next.js Discord

Discord Forum

NextJS 15 don’t works with opentelemetry

Unanswered
Southeastern blueberry bee posted this in #help-forum
Open in Discord
Southeastern blueberry beeOP
Hello, im actually trying to add observability into my nextjs app using opentelemetry.

I’ve used this https://github.com/vercel/next.js/discussions/16205#discussioncomment-9360516 template code because im using Prometheus as metrics backend.

Actually the /metrics endpoint is correctly exposed on a specific port, but 0 metrics are emitted from my nextjs app event after multiple server side interaction by triggering route handlers and I would really know why :/ ?

Note: I’ve noticed that there is no more instrumentationHook typescript definition on nextjs 15 config and no explanation on why this option was removed in patch note (https://nextjs.org/blog/next-15-rc#optimizing-bundling-of-external-packages-stable). Does this mean that it is now enabled by default, or that the instrumentations are not covered in this 15 version?

0 Replies