From 1d0ffe4b2e6aa1c722e680ecb3b9db4bd353a2f6 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 5 Mar 2015 17:44:01 +0100 Subject: [PATCH] Add more informations to crash reports --- gns3server/crash_report.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index 099ab28a..f5da30f4 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -17,8 +17,10 @@ import raven import json -import asyncio.futures -import asyncio + +import sys +import struct +import platform from .version import __version__ from .config import Config @@ -50,6 +52,15 @@ class CrashReport: "url": request.path, "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: self._client.captureException() except Exception as e: