Skip to content

Commit 7c40425

Browse files
committed
report crashes to my project
1 parent 563c4b0 commit 7c40425

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

selfdrive/sentry.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
from selfdrive.hardware import HARDWARE, PC
99
from selfdrive.swaglog import cloudlog
1010
from selfdrive.version import get_branch, get_commit, get_origin, get_version, \
11-
is_comma_remote, is_dirty, is_tested_branch
11+
is_fork_remote, is_dirty, is_tested_branch
12+
13+
from common.op_params import opParams
1214

1315

1416
class SentryProject(Enum):
1517
# python project
16-
SELFDRIVE = "https://6f3c7076c1e14b2aa10f5dde6dda0cc4@o33823.ingest.sentry.io/77924"
18+
SELFDRIVE = "https://fde85a30a43a4a1b9d873c9b140143ac@o237581.ingest.sentry.io/6365324"
1719
# native project
1820
SELFDRIVE_NATIVE = "https://[email protected]/157615"
1921

@@ -43,9 +45,9 @@ def set_tag(key: str, value: str) -> None:
4345

4446

4547
def init(project: SentryProject) -> None:
46-
# forks like to mess with this, so double check
47-
comma_remote = is_comma_remote() and "commaai" in get_origin(default="")
48-
if not comma_remote or not is_registered_device() or PC:
48+
fork_remote = is_fork_remote() and "sshane" in get_origin(default="")
49+
# only report crashes to fork maintainer's sentry repo, skip native project
50+
if not fork_remote or not is_registered_device() or PC or project == SentryProject.SELFDRIVE_NATIVE:
4951
return
5052

5153
env = "release" if is_tested_branch() else "master"
@@ -70,6 +72,7 @@ def init(project: SentryProject) -> None:
7072
sentry_sdk.set_tag("branch", get_branch())
7173
sentry_sdk.set_tag("commit", get_commit())
7274
sentry_sdk.set_tag("device", HARDWARE.get_device_type())
75+
sentry_sdk.set_tag("username", opParams().get('username'))
7376

7477
if project == SentryProject.SELFDRIVE:
7578
sentry_sdk.Hub.current.start_session()

0 commit comments

Comments
 (0)