feat(api): integrate Sentry for error tracking and monitoring #171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to integrate Sentry for error monitoring and improve environment configuration to the API. The key changes include adding Sentry DSN variables, updating Docker and FastAPI configurations, and creating tests for the new settings.
Sentry Integration:
.env.example
: AddedSENTRY_DSN_API
andSENTRY_DSN_APP
environment variables for Sentry integration.api/requirements.txt
: Addedsentry-sdk[fastapi]==2.19.0
to dependencies.api/src/app.py
: Initialized Sentry SDK with DSN and environment settings.api/src/config.py
: AddedSENTRY_DSN
andAPP_ENV
settings to the configuration. [1] [2]compose.yml
: AddedSENTRY_DSN
to the environment variables.Environment Configuration:
.env.example
: Removed theENV
variable.api/Dockerfile
: AddedAPP_ENV
environment variable for different stages (development, test, production). [1] [2]CI/CD Integration:
.github/workflows/main.yml
: Added a step to release to Sentry using GitHub Actions.Testing:
api/tests/test_config.py
: Added tests for the new settings, including scenarios with and without passwords and handling non-existent password files.