Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sentry #16

Merged
merged 12 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

SENTRY_LARAVEL_DSN=
SENTRY_TRACES_SAMPLE_RATE=1.0
SENTRY_ENVIRONMENT=

VITE_APP_NAME="${APP_NAME}"
VITE_APP_ENV="${APP_ENV}"
VITE_APP_URL="${APP_URL}"
Expand All @@ -62,3 +66,8 @@ VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

VITE_SENTRY_DSN_PUBLIC="${SENTRY_LARAVEL_DSN}"
VITE_SENTRY_ORGANIZATION=
VITE_SENTRY_PROJECT=
VITE_SENTRY_AUTH_TOKEN=
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ yarn-error.log
/reports/
/tsconfig.tsbuildinfo
/.phpunit.cache/

# Sentry Config File
.env.sentry-build-plugin
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This step is not necessary when you use Docker.
- Php ECS
- Rector Php
- XDebug
- Sentry
- Single Action and Clean Controllers
- Request Classes
- Strict Mode
Expand Down Expand Up @@ -252,6 +253,19 @@ Full documentation of clockwork in this [link](https://underground.works/clockwo

It is mandatory to install plugin of clockwork in your browser check this [link](https://chrome.google.com/webstore/detail/clockwork/dmggabnehkmmfmdffgajcflpdjlnoemp/related?hl=es)

## Sentry

Sentry is a developer-first error tracking and performance monitoring platform. Errors are logged both from the frontend and backend. In order to get it up and running, you need to follow these steps:

1. Create an account [here](https://sentry.io)
2. Create a project within an organization
3. Copy the DSN provided below "Configure SDK" and paste it in your `.env`'s `SENTRY_LARAVEL_DSN`
4. You can test your configuration using `sail artisan sentry:test`

**DISCLAIMER**: If you see this in your network tab, it may be due to the browser you're using. This screenshot was taken from the Arc browser, which made it seem as if something was missing, while on the Google browser the request is successful.

![Sentry request error](image.png)

## HTTP Codes References

The next list contains the HTTP codes returned by the API and the meaning in the present context:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"sentry/sentry-laravel": "^4.1",
"spatie/laravel-query-builder": "^5.6"
},
"require-dev": {
Expand Down
Loading