Skip to content

Commit

Permalink
Showing 5 changed files with 154 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -41,3 +41,5 @@ PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

HONEYBADGER_API_KEY=
4 changes: 4 additions & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -34,6 +34,10 @@ class Handler extends ExceptionHandler
*/
public function report(Exception $exception)
{
if (app()->bound('honeybadger') && $this->shouldReport($exception)) {
app('honeybadger')->notify($exception, app('request'));
}

parent::report($exception);
}

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"cossou/jasperphp": "^2.7",
"fideloper/proxy": "^4.0",
"google/recaptcha": "^1.2",
"honeybadger-io/honeybadger-php": "^1.2",
"honeybadger-io/honeybadger-laravel": "^1.4",
"laravel/framework": "5.6.*",
"laravel/tinker": "^1.0",
"robmorgan/phinx": "^0.10.6",
122 changes: 121 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions config/honeybadger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

return [
'api_key' => env('HONEYBADGER_API_KEY'),
'environment' => [
'filter' => [],
'include' => [],
],
'request' => [
'filter' => [],
],
// 'version' => trim(exec('git log --pretty="%h" -n1 HEAD')),
'version' => env('APP_VERSION'),
'hostname' => gethostname(),
'project_root' => base_path(),
'environment_name' => request()->getHttpHost(),
'handlers' => [
'exception' => true,
'error' => true,
],
'client' => [
'timeout' => 0,
'proxy' => [],
],
'excluded_exceptions' => [],
];

0 comments on commit 9ec1b8d

Please sign in to comment.