|  |  |  | @ -4,7 +4,8 @@ from enum import Enum | 
			
		
	
		
			
				
					|  |  |  |  | from sentry_sdk.integrations.threading import ThreadingIntegration | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | from common.params import Params | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.hardware import HARDWARE | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.athena.registration import is_registered_device | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.hardware import HARDWARE, PC | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.swaglog import cloudlog | 
			
		
	
		
			
				
					|  |  |  |  | from selfdrive.version import get_branch, get_commit, get_origin, get_version, \ | 
			
		
	
		
			
				
					|  |  |  |  |                               is_comma_remote, is_dirty, is_tested_branch | 
			
		
	
	
		
			
				
					|  |  |  | @ -37,9 +38,14 @@ def capture_exception(*args, **kwargs) -> None: | 
			
		
	
		
			
				
					|  |  |  |  |     cloudlog.exception("sentry exception") | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | def set_tag(key: str, value: str) -> None: | 
			
		
	
		
			
				
					|  |  |  |  |   sentry_sdk.set_tag(key, value) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | def init(project: SentryProject) -> None: | 
			
		
	
		
			
				
					|  |  |  |  |   # forks like to mess with this, so double check | 
			
		
	
		
			
				
					|  |  |  |  |   if not (is_comma_remote() and "commaai" in get_origin(default="")): | 
			
		
	
		
			
				
					|  |  |  |  |   comma_remote = is_comma_remote() and "commaai" in get_origin(default="") | 
			
		
	
		
			
				
					|  |  |  |  |   if not comma_remote or not is_registered_device() or PC: | 
			
		
	
		
			
				
					|  |  |  |  |     return | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   env = "release" if is_tested_branch() else "master" | 
			
		
	
	
		
			
				
					|  |  |  | 
 |