next.js
5a4c295a - [Cache Components] Dim logs after prerender aborts (#84153)

Commit
113 days ago
[Cache Components] Dim logs after prerender aborts (#84153) When prerenders abort we reject hanging promises so resources can clean up. This can lead to user code which logs errors from rejections reporting many more errors than expected and these logs are for semantically irrelevant errors. To make it clearer that these errors are not semantically relevant we will dim them. This is a partial solution because 3rd party loggers will not necessarily interpret this and so these logs might continue to show up as normal logs in donwstream systems. We may need to ask that consumers of these logs interpret the dimmed nature and convey this status to the viewer. We will follow up this work with a config that allows you to hide logs from aborted prerenders. This will completely suppress their emission to the underlying log system but it will run after any userland patches so you could still end up reporting errors for instance to an otel collector because the filtering would be applied after not before. The right way to solve this is for the log to check if there is a react cacheSignal that is aborted and do their own suppresion.
Author
Parents
Loading