Replies: 3 comments 4 replies
-
Sorry for this ads like, for Sentry, you can use openmage-sentry. |
Beta Was this translation helpful? Give feedback.
-
Maybe worth to test ... https://github.com/firegento/firegento-logger/tree/develop/src/lib/sentry |
Beta Was this translation helpful? Give feedback.
-
Just want to update you that #3613 exists. If anyone is interested in my implementation of Sentry, let me know and I'll write it down in some bullet points. |
Beta Was this translation helpful? Give feedback.
-
Description (*)
I'd like a new event (naming propose: mage_installed_exception) to catch events thrown before Mage sends the response to the frontend.
Expected behavior (*)
Benefits
Using this new event ("mage_installed_exception") one can integrate their own way of handling Exceptions and i.e. forward them to a 3rd party error catcher, such as Sentry.
Additional information
I could not find another way of catching or forwarding an (Unhandled?) exceptions, for instance when thrown from Observer context.
Exceptions are caught at "\Mage::run" and thats it.
I've tested integrating the Sentry 1.11 SDK (called Raven) in a OpenMage 20.0.12 enviroment.
I've installed Sentry SDK using composer into a custom modules directory and used the additional includes glob from the Mage.php file
to auto-load a file called "sentry.init.php" with this content:
Please not that I had to manually import files from Sentry nonetheless, because I think the autoloader from Magento doesnt find the files - although the computer autoloader should've caught that? Not sure.. But I reckon the Mage autoloader overwrites / destroys the other autoloaders.
Creating the new event allows to catch it in an observer, and forward the exception however you like.
For example here:
Beta Was this translation helpful? Give feedback.
All reactions