Skip to content

Commit

Permalink
feat: add sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Nov 13, 2023
1 parent 6d5f0ce commit 1c1ea45
Show file tree
Hide file tree
Showing 6 changed files with 1,520 additions and 259 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

SENTRY_LARAVEL_DSN=
# Specify a fixed sample rate
SENTRY_TRACES_SAMPLE_RATE=0.2
# Set a sampling rate for profiling - this is relative to traces_sample_rate
SENTRY_PROFILES_SAMPLE_RATE=0.5
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ RUN apk update && \
#
# install extensions
install-php-extensions \
excimer \
exif \
gd \
pdo_mysql \
zip \
intl \
mbstring \
exif
pdo_mysql \
zip

COPY --chown=www-data:www-data . /var/www
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
Expand Down
4 changes: 3 additions & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class Handler extends ExceptionHandler
public function register(): void
{
$this->reportable(function (Throwable $e) {
//
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
});
}

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"laravel/tinker": "^2.8",
"league/flysystem-aws-s3-v3": "^3.15",
"pxlrbt/filament-excel": "^1.1",
"sentry/sentry-laravel": "^3.8",
"spatie/laravel-activitylog": "^4.7",
"spatie/laravel-medialibrary": "^10.11",
"spatie/laravel-newsletter": "^5.1",
Expand Down
Loading

0 comments on commit 1c1ea45

Please sign in to comment.