PHP Exceptions Monitoring

Exceptions monitoring

Manual reporting

Palzin Monitor allows you to report exceptions manually if you want be aware of it but you don't want to block the execution of your code:

try {

    /*
     * Your dangerous code here.
     */

} catch (\Exception $exception) {
    // Report an exception intentionally to collect diagnostics data
    $palzin->reportException($exception);
}

If any issues occur in your code, you will receive real-time alerts in your inbox, ensuring that you are promptly notified of any exceptions. Furthermore, Palzin Monitor will continue to monitor and track subsequent occurrences of the exception for further analysis and investigation. This proactive approach allows you to stay informed about any problems that may arise within your codebase.

Use PHP global handler

In alternative you can use the PHP global exceptions handler to be sure that any unhandled exception will be reported in your Palzin Monitor dashboard:

set_exception_handler(function (Throwable $exception) use ($palzin) {
    
    // Other exception management tasks...
    
    $palzin->reportException($exception);
    
});

Exception monitoring

When an exception is detected, you can examine the code within the stack trace to gain insights into the specific portion of the code that triggered the exception. This information is valuable for understanding the context and identifying potential causes of the exception. Additionally, Palzin Monitor allows you to track the frequency of occurrences for a particular exception, enabling you to analyze patterns and trends over time. This monitoring capability aids in conducting thorough investigations and resolving any underlying issues in your codebase.

Exception

Last updated: 1 year ago

Want to get started with Palzin Monitor? We offer a no-strings-attached
15 days trial. No credit card required.

It takes less than a minutes to setup your first monitoring.