1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00

Add more informations to crash reports

This commit is contained in:
Julien Duponchelle 2015-03-05 17:44:01 +01:00
parent 83c1ada63e
commit 1d0ffe4b2e

View File

@ -17,8 +17,10 @@
import raven import raven
import json import json
import asyncio.futures
import asyncio import sys
import struct
import platform
from .version import __version__ from .version import __version__
from .config import Config from .config import Config
@ -50,6 +52,15 @@ class CrashReport:
"url": request.path, "url": request.path,
"data": request.json, "data": request.json,
}) })
self._client.tags_context({
"os:name": platform.system(),
"os:release": platform.release(),
"python:version": "{}.{}.{}".format(sys.version_info[0],
sys.version_info[1],
sys.version_info[2]),
"python:bit": struct.calcsize("P") * 8,
"python:encoding": sys.getdefaultencoding()
})
try: try:
self._client.captureException() self._client.captureException()
except Exception as e: except Exception as e: