Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Catching Garden/Vanilla Exceptions With Sentry/Raven
odannyc
New
What I'm trying to do is catch all exceptions thrown by garden/vanilla and log them into Sentry (https://getsentry.com).
I've been looking at implementing this for some time and read through the docs of the PHP Sentry handler (https://github.com/getsentry/sentry-php)
Now, I searched through the plugins section and Googled it, and it doesn't seem like Sentry has been implemented with Garden/Vanilla before. Can anyone guide me to the correct way of doing so?
From what I can see in the Sentry docs, I have to maybe attached to the Gdn_UserException class maybe?
Any ideas?
Tagged:
0
Comments
EDIT:
I got a plugin working. BUT I need a suggestion. I hooked into this hook:
Gdn_Dispatcher_AfterEnabledApplication_Handler
This obviously runs on every page load. Would that be a good hook to hook into or is another one better?
Don't you need to run on every page load?
You could override the Gdn_UserException class if you want to log user facing errors.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
There's improved logging features coming in 2.3, fyi.