Merge "Add scope_id to orchestrator log"

This commit is contained in:
Zuul 2018-10-19 08:34:26 +00:00 committed by Gerrit Code Review
commit 74c0cbb4d3
1 changed files with 9 additions and 4 deletions

View File

@ -201,15 +201,20 @@ class Worker(BaseWorker):
raise
except Exception as e:
LOG.warning(
'Error while collecting metric '
'[%(scope_id)s] Error while collecting metric '
'%(metric)s: %(error)s',
{'metric': metric, 'error': e})
{
'scope_id': self._tenant_id,
'metric': metric,
'error': e,
},
)
raise collector.NoDataCollected('', metric)
except collector.NoDataCollected:
LOG.info(
'No data collected for metric {} '
'[{}] No data collected for metric {} '
'at timestamp {}'.format(
metric, ck_utils.ts2dt(timestamp))
self._tenant_id, metric, ck_utils.ts2dt(timestamp))
)
else:
# Rating