Skip to content

Commit ab71ea8

Browse files
committed
Refactor Sentry configuration to use app-specific environment variables
1 parent 3a7686d commit ab71ea8

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

app/Nova/Metrics/Issues.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public function calculate(NovaRequest $request): ValueResult
3838
$count = count($data['installed'] ?? []);
3939
} else {
4040
//
41-
$organization = config('sentry.organization');
42-
$project = config('sentry.project');
43-
$token = config('sentry.token');
41+
$organization = config('app.sentry_organization');
42+
$project = config('app.sentry_project');
43+
$token = config('app.sentry_token');
4444

4545
$client = new \GuzzleHttp\Client;
4646
$response = $client->request('GET', "https://sentry.io/api/0/projects/$organization/$project/issues/", [

config/app.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,14 @@
154154
'disk_space_limit' => env('DISK_SPACE_LIMIT', 107374182400),
155155
'disk_inode_limit' => env('DISK_INODE_LIMIT', 400000),
156156

157+
/*
158+
|--------------------------------------------------------------------------
159+
| SENTRY API
160+
|--------------------------------------------------------------------------
161+
|
162+
*/
163+
'sentry_organization' => env('SENTRY_ORGANIZATION_ID'),
164+
'sentry_project' => env('SENTRY_PROJECT_ID'),
165+
'sentry_token' => env('SENTRY_AUTH_TOKEN'),
166+
157167
];

config/sentry.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
// @see https://docs.sentry.io/product/sentry-basics/dsn-explainer/
1111
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
1212

13-
'organization' => env('SENTRY_ORGANIZATION_ID'),
14-
'project' => env('SENTRY_PROJECT_ID'),
15-
'token' => env('SENTRY_AUTH_TOKEN'),
16-
1713
// @see https://spotlightjs.com/
1814
// 'spotlight' => env('SENTRY_SPOTLIGHT', false),
1915

0 commit comments

Comments
 (0)