Skip to content

Commit 00eb41f

Browse files
fix(sentry): fixes sentry issue in api workers
1 parent 5ef9ac1 commit 00eb41f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

API/api_worker.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@
4848
# Standard library imports
4949
import zipfile
5050

51+
# Sentry initialization
52+
# Reader imports
53+
from src.config import SENTRY_DSN, SENTRY_RATE
54+
55+
if SENTRY_DSN:
56+
# Third party imports
57+
import sentry_sdk
58+
sentry_sdk.init(
59+
dsn=SENTRY_DSN,
60+
traces_sample_rate=SENTRY_RATE,
61+
)
62+
63+
64+
5165
celery = Celery("Raw Data API")
5266
celery.conf.broker_url = celery_broker_uri
5367
celery.conf.result_backend = celery_backend

0 commit comments

Comments
 (0)