]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add logs URL to sentry reports
authorZack Cerza <zack@cerza.org>
Wed, 11 Sep 2013 15:17:02 +0000 (10:17 -0500)
committerZack Cerza <zack@cerza.org>
Wed, 11 Sep 2013 18:44:28 +0000 (13:44 -0500)
teuthology/run_tasks.py

index 4807191d9d5adf52832de1a72d2133f6c3d372a0..a791e907687b85daa51d04294a23a0fbaaae9ab3 100644 (file)
@@ -1,6 +1,7 @@
 import sys
 import logging
-from teuthology.sentry import get_client as get_sentry_client
+from .sentry import get_client as get_sentry_client
+from .misc import get_http_log_path
 from .config import config as teuth_config
 
 log = logging.getLogger(__name__)
@@ -41,7 +42,13 @@ def run_tasks(tasks, ctx):
                 'task': taskname,
                 'owner': ctx.owner,
             }
-            exc_id = sentry.get_ident(sentry.captureException(tags=tags))
+            extra = {
+                'logs': get_http_log_path(ctx.archive, ctx.job_id),
+            }
+            exc_id = sentry.captureException(
+                tags=tags,
+                extra=extra,
+            )
             event_url = "{server}/search?q={id}".format(
                 server=teuth_config.sentry_server.strip('/'), id=exc_id)
             log.exception(" Sentry event: %s" % event_url)