def sentry_exc(exc, delay=False): if error_reporting_enabled(): if isinstance(exc, six.string_types): capture_exception(Exception(exc)) else: capture_exception(exc) if delay: time.sleep(2)
def sentry_exc( exc: Union[str, BaseException, Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType], ], None, ], delay: bool = False, ) -> None: if error_reporting_enabled(): if isinstance(exc, str): capture_exception(Exception(exc)) else: capture_exception(exc) if delay: time.sleep(2)
def sentry_message(message): if error_reporting_enabled(): capture_message(message)
from wandb.errors.error import CommError from wandb.lib.git import GitRepo from wandb import env logger = logging.getLogger(__name__) _not_importable = set() IS_GIT = os.path.exists(os.path.join(os.path.dirname(__file__), '..', '.git')) # these match the environments for gorilla if IS_GIT: SENTRY_ENV = 'development' else: SENTRY_ENV = 'production' if error_reporting_enabled(): sentry_sdk.init( dsn= "https://[email protected]/5288891", release=wandb.__version__, default_integrations=False, environment=SENTRY_ENV) def sentry_message(message): if error_reporting_enabled(): capture_message(message) def sentry_exc(exc, delay=False): if error_reporting_enabled():
def sentry_exc(exc): if error_reporting_enabled(): if isinstance(exc, six.string_types): capture_exception(Exception(exc)) else: capture_exception(exc)
def sentry_message(message: str) -> None: if error_reporting_enabled(): capture_message(message)