From f8f2256cbaa3a4016f538c2a503ea1d3ed0b9c13 Mon Sep 17 00:00:00 2001 From: Kian Date: Wed, 11 Dec 2024 19:24:12 +0330 Subject: [PATCH 1/2] feat: setup monitoring configuration --- .gitignore | 5 ++++- FD/settings.py | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 02fa3dc..a2419a9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ venv/ .env **/__pycache__/ Dockerfile -docker-compose.yml \ No newline at end of file +docker-compose.yml +.env.docker +.coverage +.Dockerignore \ No newline at end of file diff --git a/FD/settings.py b/FD/settings.py index 23525eb..8c1fc8d 100644 --- a/FD/settings.py +++ b/FD/settings.py @@ -183,4 +183,19 @@ # "hosts": [("127.0.0.1", 6379)], }, }, -} \ No newline at end of file +} + +import sentry_sdk + +sentry_sdk.init( + dsn="https://ccb764743ed51a9f962c8417f8dfe02a@o4508450288631808.ingest.de.sentry.io/4508450290663504", + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for tracing. + traces_sample_rate=1.0, + _experiments={ + # Set continuous_profiling_auto_start to True + # to automatically start the profiler on when + # possible. + "continuous_profiling_auto_start": True, + }, +) \ No newline at end of file From 25f03a78805ffa217d05a95fc4df6887bff8caab Mon Sep 17 00:00:00 2001 From: Kian Date: Wed, 11 Dec 2024 21:14:51 +0330 Subject: [PATCH 2/2] feat: first issue --- FD/urls.py | 4 ++++ requirements.txt | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/FD/urls.py b/FD/urls.py index 44e5363..52268df 100644 --- a/FD/urls.py +++ b/FD/urls.py @@ -2,7 +2,11 @@ from django.urls import include, path from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView +def trigger_error(request): + division_by_zero = 1 / 0 + urlpatterns = [ + path('trigger_error/', trigger_error), path('admin/', admin.site.urls), path('authentication/', include('authentication.urls')), diff --git a/requirements.txt b/requirements.txt index c97b717..278c5d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,13 @@ autobahn==24.4.2 Automat==24.8.1 boto3==1.35.64 botocore==1.35.64 +certifi==2024.8.30 cffi==1.17.1 channels==4.2.0 channels_redis==4.2.1 +colorama==0.4.6 constantly==23.10.4 +coverage==7.6.9 cryptography==43.0.3 daphne==4.1.2 Django==5.1.2 @@ -17,22 +20,33 @@ django-storages==1.14.4 djangorestframework==3.15.2 djangorestframework-simplejwt==5.3.1 drf-spectacular==0.27.2 +execnet==2.1.1 +flake8==7.1.1 +hiredis==3.0.0 hyperlink==21.0.0 idna==3.10 incremental==24.7.2 inflection==0.5.1 +iniconfig==2.0.0 jmespath==1.0.1 jsonschema==4.23.0 jsonschema-specifications==2024.10.1 +mccabe==0.7.0 msgpack==1.1.0 mysql-connector-python==9.1.0 -mysqlclient==2.2.5 +packaging==24.2 pillow==11.0.0 +pluggy==1.5.0 pyasn1==0.6.1 pyasn1_modules==0.4.1 +pycodestyle==2.12.1 pycparser==2.22 +pyflakes==3.2.0 PyJWT==2.9.0 pyOpenSSL==24.2.1 +pytest==8.3.4 +pytest-django==4.9.0 +pytest-xdist==3.6.1 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 PyYAML==6.0.2 @@ -40,6 +54,7 @@ redis==5.2.0 referencing==0.35.1 rpds-py==0.20.1 s3transfer==0.10.3 +sentry-sdk==2.19.2 service-identity==24.2.0 setuptools==75.6.0 six==1.16.0 @@ -50,4 +65,4 @@ typing_extensions==4.12.2 tzdata==2024.2 uritemplate==4.1.1 urllib3==2.2.3 -zope.interface==7.1.1 \ No newline at end of file +zope.interface==7.1.1