Add sentry

This commit is contained in:
2022-04-24 15:41:06 +03:00
parent ed5ba1e973
commit da9585badf
6 changed files with 65 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ from fastapi import FastAPI
from app.views import router
from core.arq_pool import get_arq_pool
import core.sentry # noqa: F401
def start_app() -> FastAPI:

View File

@@ -30,5 +30,7 @@ class EnvConfig(BaseSettings):
FL_BASE_URL: str
SENTRY_DSN: str
env_config = EnvConfig()

8
src/core/sentry.py Normal file
View File

@@ -0,0 +1,8 @@
import sentry_sdk
from core.config import env_config
sentry_sdk.init(
env_config.SENTRY_DSN,
)

View File

@@ -4,6 +4,7 @@ from arq.cron import cron
from app.services.updaters.fl_updater import __tasks__ as fl_tasks
from app.services.updaters.fl_updater import run_fl_update
from core.arq_pool import get_redis_settings, get_arq_pool
import core.sentry # noqa: F401
async def startup(ctx):