Next.js Discord

Discord Forum

Has anyone managed to get structured logging with seq in there NextJS App?

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Avatar
Transvaal lionOP
I'd like to have NextJS reporting all log events (client and server) back to my Seq instance. ideally, I'd also like to add open telemetry as well.

The end goal is to be able to trace a given request/action through my entire stack, allowing me to filter the logs in Seq to show me every log entry related to a specific error.

I've tried setting up pino for this but it appears that the transport option in pino uses a worker thread to handle log transports. However, Next.js's environment (especially in RSC or during server rendering) doesn't support this mechanism directly due to module resolution or the worker runtime.

Are there any other options?

1 Reply

Avatar
Transvaal lionOP
I guess not :/