From 3625cda4677e551ecf79f3c6b86dd8c8f53917db Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Mon, 27 Jun 2016 16:00:43 -0400 Subject: [PATCH] Adding Metadata to Errors Adding Metadata to Errors so we can search on metadata in relation to errors Change-Id: I4cd18d484ed9a21ad17cb2eeea9423a77c0ead10 --- lib/Rally.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Rally.py b/lib/Rally.py index 183821630..4e19f9778 100644 --- a/lib/Rally.py +++ b/lib/Rally.py @@ -143,13 +143,15 @@ class Rally(WorkloadBase): rally_data[value].append(metrics[workload][value]) if len(metrics['error']) > 0: error = {'action_name': value, - 'error': metrics['error'], + 'error_type': metrics['error'][0], + 'error_msg': metrics['error'][1], 'result': task_id, 'timestamp': es_ts, 'rally_setup': rally_json[0]['key'], 'scenario': scenario_name, } - self.elastic.index_result(error, 'error') + error_result = self.elastic.combine_metadata(error) + self.elastic.index_result(error_result, 'error') for workload in rally_data: if not type(rally_data[workload]) is dict: iteration = 1