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>
pull/1969/head^2
Adeeb Shihadeh 5 years ago committed by GitHub
parent 9cd7a7c14b
commit dfbd658a2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      selfdrive/crash.py
  2. 10
      selfdrive/tombstoned.py

@ -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…
Cancel
Save