Improve the handling of error reports (var/report
)
#3994
Replies: 2 comments
-
Sentry does all this, more, and better. |
Beta Was this translation helpful? Give feedback.
-
Yes and I have another APM that catches it as well. But I'm not sure what you mean with that. The out of the box product takes a weird direction here, using a parallel logging system that some users will miss and has an email system that is likely to shutdown a company's email system if there is ever an error on the site, and also it's full of |
Beta Was this translation helpful? Give feedback.
-
When OM runs into an exception very early in the execution of the code, before
Mage::log()
orMage::logException()
can take care of it, the following code comes into play: https://github.com/OpenMage/magento-lts/tree/main/errors. It basically writes a dump of the error and the trace tovar/report/
in a extension-less file.Several things that I'm not comfortable with:
serialize()
(maybe JSON is better), creates one file per error, and is placed in a directory that is not self-explanatory so it might be overlooked.email()
(notZend_Mail
), does not care about SMTP plugins etc. and I can understand that, as this handler is separated from OM and cannot rely on those libs. However, there is no throttling hence it could seriously create problems if hundreds of these emails are sent every minute in the case of, for example, an unreachable database.My suggestion would be to start writing these messages to a new NDJSON file in
var/log/
, along with all the metadata that the email has (maybe more). But I would appreciate any thoughts from you all!Beta Was this translation helpful? Give feedback.
All reactions