-
Hi community, Since Next.js plays as a server, our dev team want to be able to log it and generate/attach a consistent The documentation mentioned
Any suggestion will be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
You could do it in middleware.ts |
Beta Was this translation helpful? Give feedback.
-
Hi @PoppinMic,
|
Beta Was this translation helpful? Give feedback.
-
The request ID is essential for debugging and is a fundamental aspect of logging and tracing. As a developer, I need all my logs to include the corresponding request ID. From a technical standpoint, we know that Vercel logs an access log, which likely includes a request ID within that context. How can we retrieve it from the code? Is there an environment variable, metadata on the request, or another method to access it? |
Beta Was this translation helpful? Give feedback.
You could do it in middleware.ts