Skip to content

Commit 6c2aa5e

Browse files
rokroskarmohammad-alisafaee
authored andcommitted
chore: add missing sentry env (#1607)
(cherry picked from commit 197327a)
1 parent 9790707 commit 6c2aa5e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

renku/cli/exception_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self, *args, **kwargs):
109109
if HAS_SENTRY:
110110
import sentry_sdk
111111

112-
sentry_sdk.init()
112+
sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"), environment=os.getenv("SENTRY_ENV"))
113113

114114
def main(self, *args, **kwargs):
115115
"""Catch all exceptions."""

renku/service/.env-example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ DEPLOYMENT_LOG_LEVEL=INFO
2222

2323
# Scheduler
2424
RENKU_SVC_CLEANUP_INTERVAL=60
25+
26+
# Sentry
27+
SENTRY_DSN=
28+
SENTRY_ENV=

renku/service/worker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
from renku.service.logger import DEPLOYMENT_LOG_LEVEL, worker_log
2929

3030
if os.getenv("SENTRY_DSN"):
31-
sentry_sdk.init(os.getenv("SENTRY_DSN"), integrations=[RqIntegration()])
31+
sentry_sdk.init(
32+
dsn=os.getenv("SENTRY_DSN"), environment=os.getenv("SENTRY_ENV"), integrations=[RqIntegration()],
33+
)
3234

3335

3436
@contextmanager

0 commit comments

Comments
 (0)