raven-php is an experimental PHP client for Sentry.
// Register the autoloader require('/path/to/Raven/Autoloader.php'); Raven_Autoloader::register(); // Instantiate a new client with a compatible DSN $client = new Raven_Client('http://public:[email protected]/1'); // Capture a message $event_id = $client->getIdent($client->captureMessage('my log message')); // Capture an exception $event_id = $client->getIdent($client->captureException($ex)); // Give the user feedback echo "Sorry, there was an error!"; echo "Your reference ID is " . $event_id; // Install error handlers $error_handler = new Raven_ErrorHandler($client); set_error_handler(array($error_handler, 'handleError'); set_exception_handler(array($error_handler, 'handleException'));
- Bug Tracker
- Code
- IRC (irc.freenode.net, #sentry)