|
|
@ -446,18 +446,19 @@ def set_sentry():
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def before_send(event, hint):
|
|
|
|
def before_send(event, hint):
|
|
|
|
if is_git_dir() and get_git_origin_url() != "https://github.com/ultralytics/ultralytics.git":
|
|
|
|
oss = 'colab' if is_colab() else 'kaggle' if is_kaggle() else 'jupyter' if is_jupyter() else \
|
|
|
|
return None
|
|
|
|
|
|
|
|
event_os = 'colab' if is_colab() else 'kaggle' if is_kaggle() else 'jupyter' if is_jupyter() else \
|
|
|
|
|
|
|
|
'docker' if is_docker() else platform.system()
|
|
|
|
'docker' if is_docker() else platform.system()
|
|
|
|
event['tags'] = {
|
|
|
|
event['tags'] = {
|
|
|
|
"sys_argv": sys.argv[0],
|
|
|
|
"sys_argv": sys.argv[0],
|
|
|
|
"sys_argv_name": Path(sys.argv[0]).name,
|
|
|
|
"sys_argv_name": Path(sys.argv[0]).name,
|
|
|
|
"install": 'git' if is_git_dir() else 'pip' if is_pip_package() else 'other',
|
|
|
|
"install": 'git' if is_git_dir() else 'pip' if is_pip_package() else 'other',
|
|
|
|
"os": event_os}
|
|
|
|
"os": oss}
|
|
|
|
return event
|
|
|
|
return event
|
|
|
|
|
|
|
|
|
|
|
|
if SETTINGS['sync'] and not is_pytest_running() or is_github_actions_ci():
|
|
|
|
if SETTINGS['sync'] and \
|
|
|
|
|
|
|
|
not is_pytest_running() and \
|
|
|
|
|
|
|
|
not is_github_actions_ci() and \
|
|
|
|
|
|
|
|
(is_pip_package() or get_git_origin_url() == "https://github.com/ultralytics/ultralytics.git"):
|
|
|
|
import sentry_sdk # noqa
|
|
|
|
import sentry_sdk # noqa
|
|
|
|
|
|
|
|
|
|
|
|
import ultralytics
|
|
|
|
import ultralytics
|
|
|
|