To show how Sentry works in an example web app that uses PHP Laravel
Demonstrates:
- Import/integrate SDK into project
- Configuration
- Releases/Commits
- Event management
Official Sentry documentation found here: https://docs.sentry.io/platforms/php/laravel/
Trigger an error that gets sent as Event to Sentry.io Platform web.php has multiple endpoints for showing different ways that errors are handled
dependency | version |
---|---|
sentry-laravel | 2.10.2 |
sentry-sdk | 3.1 |
sentry-cli | 1.53.0 |
laravel | 8.0 |
php | 7.2.5 |
composer install
- Set your DSN key, projectID, and Sentry OrganizationID in
.env
- make
http://localhost:8000/handled
andhttp://localhost:8000/unhandled
to trigger errors
- docker build -t my-first-image .
- docker run -p 8000:8000 my-first-image
- make deploy_gcp
This demo leverages log channels to record more info and allow you
to configure the log level in logging.php
.
The minimum event level is set to debug
by default which may be
too verbose.