mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: remove sentry from backend
This commit is contained in:
parent
543f6ea86a
commit
ae63f56645
4 changed files with 2 additions and 60 deletions
|
|
@ -5,7 +5,6 @@ from src.core.events.autoinstall import auto_install
|
|||
from src.core.events.content import check_content_directory
|
||||
from src.core.events.database import close_database, connect_to_db
|
||||
from src.core.events.logs import create_logs_dir
|
||||
from src.core.events.sentry import init_sentry
|
||||
|
||||
|
||||
def startup_app(app: FastAPI) -> Callable:
|
||||
|
|
@ -14,9 +13,6 @@ def startup_app(app: FastAPI) -> Callable:
|
|||
learnhouse_config: LearnHouseConfig = get_learnhouse_config()
|
||||
app.learnhouse_config = learnhouse_config # type: ignore
|
||||
|
||||
# Init Sentry
|
||||
await init_sentry(app)
|
||||
|
||||
# Connect to database
|
||||
await connect_to_db(app)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
from fastapi import FastAPI
|
||||
|
||||
import sentry_sdk
|
||||
|
||||
from config.config import LearnHouseConfig
|
||||
|
||||
async def init_sentry(app: FastAPI) -> None:
|
||||
|
||||
learnhouse_config : LearnHouseConfig = app.learnhouse_config # type: ignore
|
||||
if learnhouse_config.hosting_config.sentry_config is not None:
|
||||
sentry_sdk.init(
|
||||
dsn=app.learnhouse_config.hosting_config.sentry_config.dsn, # type: ignore
|
||||
environment=app.learnhouse_config.hosting_config.sentry_config.environment, # type: ignore
|
||||
release=app.learnhouse_config.hosting_config.sentry_config.release, # type: ignore
|
||||
traces_sample_rate=1.0,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue