From 1228d8cb5a7897b427cd0c76c2b7856edfaf3e48 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 11 Sep 2013 15:45:45 -0500 Subject: [PATCH] Add teuthology branch to sentry report tags --- teuthology/run_tasks.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index 7a532f5f25cbc..fa47541bbd45f 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -39,19 +39,22 @@ def run_tasks(tasks, ctx): log.exception('Saw exception from tasks.') sentry = get_sentry_client() if sentry: + config = deepcopy(ctx.config) + tags = { 'task': taskname, 'owner': ctx.owner, } - job_id = getattr(ctx, 'job_id', None) + if 'teuthology_branch' in config: + tags['teuthology_branch'] = config['teuthology_branch'] - config = deepcopy(ctx.config) # Remove ssh keys from reported config if 'targets' in config: targets = config['targets'] for host in targets.keys(): targets[host] = '' + job_id = getattr(ctx, 'job_id', None) extra = { 'config': config, 'logs': get_http_log_path(ctx.archive, job_id), -- 2.39.5