How to set Airbrake with drupal 8

52 Views Asked by At

I'm trying to use Airbrake with my drupal 8 project, I follow this GitHub page https://github.com/akalsey/airbrake-drupal. I create an account and install the Airbrake using Composer composer require airbrake/phpbrake. Then it says that I should copy this snippet into your PHP app

$notifier = new Airbrake\Notifier(array(
    'projectId' => ****,
    'projectKey' => '****'
));

Airbrake\Instance::set($notifier);

$handler = new Airbrake\ErrorHandler($notifier);
$handler->register();

But I don't know in which file I past it? Any help?

0

There are 0 best solutions below