According to this <post>, after implementing OpenT...
# support
According to this post, after implementing OpenTelemetry, I can spin up the service with:
Copy code
node tracing.js
From this post, the custom-server method will remove important optimizations, that's why I am wondering if there is a way to implement open telemetry without this custom-server? Because for production, the app is running with:
Copy code
next build
next start -p $PORT
How to build the app and use tracing.js as an entrypoint with the build version? For node-js, I can use the following code in node.js
Copy code
node -r tracing.js index.js
can I achieve a similar goal with NextJS?
You can initialize tracing.js in your main file
So you need to import
in your main application. The
import ./tracing.js
should be the first line of your application code and initialize it before any other function. Here’s the sample github repo which shows the implementation.