Skip to content

Commit 3ae0347

Browse files
committed
Larabug implementation
1 parent 7865047 commit 3ae0347

4 files changed

Lines changed: 221 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"filament/notifications": "^2.15",
1111
"guzzlehttp/guzzle": "^7.2",
1212
"invaders-xx/filament-kanban-board": "^0.2.6",
13+
"larabug/larabug": "^2.5",
1314
"laravel/framework": "^9.19",
1415
"laravel/sanctum": "^3.0",
1516
"laravel/tinker": "^2.7",

composer.lock

Lines changed: 70 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/larabug.php

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Login key
8+
|--------------------------------------------------------------------------
9+
|
10+
| This is your authorization key which you get from your profile.
11+
| Retrieve your key from https://www.larabug.com
12+
|
13+
*/
14+
15+
'login_key' => env('LB_KEY', ''),
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Project key
20+
|--------------------------------------------------------------------------
21+
|
22+
| This is your project key which you receive when creating a project
23+
| Retrieve your key from https://www.larabug.com
24+
|
25+
*/
26+
27+
'project_key' => env('LB_PROJECT_KEY', ''),
28+
29+
/*
30+
|--------------------------------------------------------------------------
31+
| Environment setting
32+
|--------------------------------------------------------------------------
33+
|
34+
| This setting determines if the exception should be send over or not.
35+
|
36+
*/
37+
38+
'environments' => [
39+
'production',
40+
],
41+
42+
/*
43+
|--------------------------------------------------------------------------
44+
| Project version
45+
|--------------------------------------------------------------------------
46+
|
47+
| Set the project version, default: null.
48+
| For git repository: shell_exec("git log -1 --pretty=format:'%h' --abbrev-commit")
49+
|
50+
*/
51+
'project_version' => null,
52+
53+
/*
54+
|--------------------------------------------------------------------------
55+
| Lines near exception
56+
|--------------------------------------------------------------------------
57+
|
58+
| How many lines to show near exception line. The more you specify the bigger
59+
| the displayed code will be. Max value can be 50, will be defaulted to
60+
| 12 if higher than 50 automatically.
61+
|
62+
*/
63+
64+
'lines_count' => 12,
65+
66+
/*
67+
|--------------------------------------------------------------------------
68+
| Prevent duplicates
69+
|--------------------------------------------------------------------------
70+
|
71+
| Set the sleep time between duplicate exceptions. This value is in seconds, default: 60 seconds (1 minute)
72+
|
73+
*/
74+
75+
'sleep' => 60,
76+
77+
/*
78+
|--------------------------------------------------------------------------
79+
| Skip exceptions
80+
|--------------------------------------------------------------------------
81+
|
82+
| List of exceptions to skip sending.
83+
|
84+
*/
85+
86+
'except' => [
87+
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException',
88+
],
89+
90+
/*
91+
|--------------------------------------------------------------------------
92+
| Key filtering
93+
|--------------------------------------------------------------------------
94+
|
95+
| Filter out these variables before sending them to LaraBug
96+
|
97+
*/
98+
99+
'blacklist' => [
100+
'*authorization*',
101+
'*password*',
102+
'*token*',
103+
'*auth*',
104+
'*verification*',
105+
'*credit_card*',
106+
'cardToken', // mollie card token
107+
'*cvv*',
108+
'*iban*',
109+
'*name*',
110+
'*email*'
111+
],
112+
113+
/*
114+
|--------------------------------------------------------------------------
115+
| Release git hash
116+
|--------------------------------------------------------------------------
117+
|
118+
|
119+
*/
120+
121+
// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
122+
123+
/*
124+
|--------------------------------------------------------------------------
125+
| Server setting
126+
|--------------------------------------------------------------------------
127+
|
128+
| This setting allows you to change the server.
129+
|
130+
*/
131+
132+
'server' => env('LB_SERVER', 'https://www.larabug.com/api/log'),
133+
134+
/*
135+
|--------------------------------------------------------------------------
136+
| Verify SSL setting
137+
|--------------------------------------------------------------------------
138+
|
139+
| Enables / disables the SSL verification when sending exceptions to LaraBug
140+
| Never turn SSL verification off on production instances
141+
|
142+
*/
143+
'verify_ssl' => env('LB_VERIFY_SSL', true),
144+
145+
];

config/logging.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@
5151
*/
5252

5353
'channels' => [
54+
'larabug' => [
55+
'driver' => 'larabug',
56+
],
57+
5458
'stack' => [
5559
'driver' => 'stack',
56-
'channels' => ['single'],
60+
'channels' => ['single', 'larabug'],
5761
'ignore_exceptions' => false,
5862
],
5963

0 commit comments

Comments
 (0)