You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the next-axiom library in my recent Next.js and I've noticed, that even for very few logs the await logger.flush() takes even up to 150ms of the whole request time. This is usually twice as much as the time for processing the whole request without the logging, and it has a significant impact on the whole page performance. The same goes for Route Handlers wrapped with withAxiom (I'm assuming it does logger.flush() under the hood).
As a result, the logs in server-side Next.js are unusable in most of my use cases (I feel like 150ms increase for all requests time is not worth it).
Is there some other way of handling Axiom logs in Next.js server-side that does not impact the response time? If not, it would be great if you could consider adding a possibility to flush logs in some kind of non-blocking way.
The text was updated successfully, but these errors were encountered:
But yes, I agree that 150ms for logging is not worth it. Besides, there's not much going on around here. I've just started a Next.js project with Axiom and I'm already considering switching to another platform.
Hi!
I'm using the
next-axiom
library in my recent Next.js and I've noticed, that even for very few logs theawait logger.flush()
takes even up to 150ms of the whole request time. This is usually twice as much as the time for processing the whole request without the logging, and it has a significant impact on the whole page performance. The same goes for Route Handlers wrapped withwithAxiom
(I'm assuming it doeslogger.flush()
under the hood).As a result, the logs in server-side Next.js are unusable in most of my use cases (I feel like 150ms increase for all requests time is not worth it).
Is there some other way of handling Axiom logs in Next.js server-side that does not impact the response time? If not, it would be great if you could consider adding a possibility to flush logs in some kind of non-blocking way.
The text was updated successfully, but these errors were encountered: