Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/blaxel/core/common/sentry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import atexit
import json
import logging
import os
import sys
import threading
import traceback
Expand Down Expand Up @@ -231,6 +232,10 @@ def init_sentry() -> None:
"""Initialize the lightweight Sentry client for SDK error tracking."""
global _sentry_initialized, _sentry_config, _handlers_registered
try:
# Don't initialize in test environments
if "pytest" in sys.modules or os.environ.get("BL_TYPE") == "test":
return

dsn = settings.sentry_dsn
if not dsn:
return
Expand Down
Loading