Add Sentry for error tracking in production
This commit is contained in:
parent
25f2d29fb6
commit
94e7962e09
2 changed files with 12 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
import sentry_sdk
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from platformdirs import user_data_dir
|
from platformdirs import user_data_dir
|
||||||
|
|
||||||
|
|
@ -190,3 +191,13 @@ if not TESTING:
|
||||||
"silk.middleware.SilkyMiddleware",
|
"silk.middleware.SilkyMiddleware",
|
||||||
*MIDDLEWARE,
|
*MIDDLEWARE,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not DEBUG:
|
||||||
|
sentry_sdk.init(
|
||||||
|
dsn="https://1aa1ac672090fb795783de0e90a2b19f@o4505228040339456.ingest.us.sentry.io/4511055670738944",
|
||||||
|
send_default_pii=True,
|
||||||
|
enable_logs=True,
|
||||||
|
traces_sample_rate=1.0,
|
||||||
|
profile_session_sample_rate=1.0,
|
||||||
|
profile_lifecycle="trace",
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ dependencies = [
|
||||||
"pydantic",
|
"pydantic",
|
||||||
"pygments",
|
"pygments",
|
||||||
"python-dotenv",
|
"python-dotenv",
|
||||||
|
"sentry-sdk",
|
||||||
"setproctitle",
|
"setproctitle",
|
||||||
"tqdm",
|
"tqdm",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue