mirror of https://github.com/commaai/openpilot.git
log remote and branch in sentry (#16766)
* log remote and branch in sentry
* also add to crash.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: dfbd658a2f
This commit is contained in:
parent
494353099b
commit
605eecdd18
|
@ -3,7 +3,7 @@ import os
|
|||
import sys
|
||||
import threading
|
||||
import capnp
|
||||
from selfdrive.version import version, dirty
|
||||
from selfdrive.version import version, dirty, origin, branch
|
||||
|
||||
from selfdrive.swaglog import cloudlog
|
||||
from common.hardware import PC
|
||||
|
@ -23,8 +23,14 @@ if os.getenv("NOLOG") or os.getenv("NOCRASH") or PC:
|
|||
else:
|
||||
from raven import Client
|
||||
from raven.transport.http import HTTPTransport
|
||||
|
||||
tags = {
|
||||
'dirty': dirty,
|
||||
'origin': origin,
|
||||
'branch': branch
|
||||
}
|
||||
client = Client('https://1994756b5e6f41cf939a4c65de45f4f2:cefebaf3a8aa40d182609785f7189bd7@app.getsentry.com/77924',
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags={'dirty': dirty})
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags=tags)
|
||||
|
||||
def capture_exception(*args, **kwargs):
|
||||
exc_info = sys.exc_info()
|
||||
|
|
|
@ -5,7 +5,7 @@ import time
|
|||
from raven import Client
|
||||
from raven.transport.http import HTTPTransport
|
||||
|
||||
from selfdrive.version import version, dirty
|
||||
from selfdrive.version import version, origin, branch, dirty
|
||||
from selfdrive.swaglog import cloudlog
|
||||
|
||||
MAX_SIZE = 100000 * 10 # Normal size is 40-100k, allow up to 1M
|
||||
|
@ -73,8 +73,14 @@ def report_tombstone(fn, client):
|
|||
|
||||
def main():
|
||||
initial_tombstones = set(get_tombstones())
|
||||
|
||||
tags = {
|
||||
'dirty': dirty,
|
||||
'origin': origin,
|
||||
'branch': branch
|
||||
}
|
||||
client = Client('https://d3b175702f62402c91ade04d1c547e68:b20d68c813c74f63a7cdf9c4039d8f56@sentry.io/157615',
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags={'dirty': dirty}, string_max_length=10000)
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags=tags, string_max_length=10000)
|
||||
|
||||
client.user_context({'id': os.environ.get('DONGLE_ID')})
|
||||
while True:
|
||||
|
|
Loading…
Reference in New Issue