Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
environment-variables: |
VERSION=${{ inputs.image-tag }}
DD_VERSION=${{ inputs.image-tag }}
SENTRY_RELEASE=${{ inputs.image-tag }}
COMMIT_ID=${{ github.sha }}
docker-labels: |
com.datadoghq.tags.version=${{ inputs.image-tag }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/_migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
environment-variables: |
VERSION=${{ inputs.image-tag }}
DD_VERSION=${{ inputs.image-tag }}
SENTRY_RELEASE=${{ inputs.image-tag }}
docker-labels: |
com.datadoghq.tags.version=${{ inputs.image-tag }}

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies = [
"python-multipart>=0.0.31",
"python-slugify==8.0.4",
"redis==5.2.*",
"sentry-sdk~=2.13",
"sqlalchemy[asyncio]~=1.4.53",
"sqlalchemy-utils~=0.41.2",
"structlog~=25.4.0",
Expand Down
3 changes: 1 addition & 2 deletions src/apps/answers/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from typing import Callable, List, Mapping

import aiohttp
import sentry_sdk
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding
Expand Down Expand Up @@ -1727,7 +1726,7 @@ async def _create_alerts(
).model_dump(),
)
except Exception as e:
sentry_sdk.capture_exception(e)
logger.exception(str(e))
break
await self.send_alert_mail(persons)

Expand Down
6 changes: 2 additions & 4 deletions src/apps/answers/tasks.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import base64
import io
import traceback
import uuid

import sentry_sdk
from fastapi import UploadFile
from sqlalchemy.ext.asyncio import AsyncSession

Expand All @@ -13,6 +11,7 @@
from apps.mailing.services import MailingService
from broker import broker
from infrastructure.database import session_manager
from infrastructure.logger import logger

# moved from previous implementation

Expand Down Expand Up @@ -64,5 +63,4 @@ async def create_report(
)
)
except Exception as e:
traceback.print_exception(e)
sentry_sdk.capture_exception(e)
logger.exception(str(e))
3 changes: 1 addition & 2 deletions src/apps/integrations/loris/service/loris.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from collections import defaultdict

import aiohttp
import sentry_sdk
from pydantic.json import pydantic_encoder

from apps.activities.crud.activity_history import ActivityHistoriesCRUD
Expand Down Expand Up @@ -890,7 +889,7 @@ async def _create_integration_alerts(self, applet_id: uuid.UUID, message: str):
)

except Exception as e:
sentry_sdk.capture_exception(e)
logger.exception(str(e))
break

async def create_loris_integration(self, hostname, username, project, password) -> LorisIntegration:
Expand Down
4 changes: 0 additions & 4 deletions src/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from config.rabbitmq import RabbitMQSettings
from config.redis import RedisSettings
from config.secret import SecretSettings
from config.sentry import SentrySettings
from config.service import JsonLdConverterSettings, ServiceSettings
from config.superuser import SuperAdmin
from config.task import AnswerEncryption, AudioFileConvert, ImageConvert
Expand Down Expand Up @@ -71,9 +70,6 @@ class Settings(BaseSettings):
# CDN configs
cdn: CDNSettings = CDNSettings()

# Sentry stuff
sentry: SentrySettings = SentrySettings()

# FCM Notification configs
fcm: FirebaseCloudMessagingSettings = FirebaseCloudMessagingSettings()

Expand Down
5 changes: 0 additions & 5 deletions src/config/sentry.py

This file was deleted.

4 changes: 0 additions & 4 deletions src/infrastructure/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Iterable, Type

import sentry_sdk
from asgi_correlation_id import CorrelationIdMiddleware
from asyncpg import InvalidPasswordError
from fastapi import FastAPI
Expand Down Expand Up @@ -111,9 +110,6 @@ def create_app():
lifespan=lifespan,
)

if settings.sentry.dsn:
sentry_sdk.init(dsn=settings.sentry.dsn, traces_sample_rate=1.0)

# Include routers
for router in routers:
app.include_router(router)
Expand Down
9 changes: 3 additions & 6 deletions src/infrastructure/utility/redis_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import redis.asyncio as redis
from redis.typing import EncodableT
from sentry_sdk import capture_exception

from config import settings
from infrastructure.logger import logger


class RedisCacheTest:
Expand Down Expand Up @@ -139,11 +139,8 @@ def _start(self):
db=self.db,
**self.configuration,
)
except redis.exceptions.ConnectionError as e:
try:
capture_exception(e)
except ImportError:
print(e)
except redis.ConnectionError as e:
logger.exception(str(e))

async def get(self, key: str) -> typing.Optional[str]:
if not self._cache:
Expand Down
15 changes: 0 additions & 15 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading