diff --git a/util/queuemetrics.py b/util/queuemetrics.py index ec1444c16..50a51790f 100644 --- a/util/queuemetrics.py +++ b/util/queuemetrics.py @@ -43,12 +43,15 @@ class SendToCloudWatch(Process): self.daemon = True def run(self): - logger.debug('Starting cloudwatch sender process.') + logger.debug('Starting CloudWatch sender process.') connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key) while True: put_metric_args, kwargs = self._put_metrics_queue.get() - logger.debug('Got queued put metrics reqeust.') - connection.put_metric_data(*put_metric_args, **kwargs) + logger.debug('Got queued put metrics request.') + try: + connection.put_metric_data(*put_metric_args, **kwargs) + except: + logger.exception('Writing to CloudWatch failed') class QueueMetrics(object):