From dd5f7cbe6cd765c54b7728e509be34042e1abd98 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Tue, 13 Dec 2016 18:02:03 -0500 Subject: [PATCH] Fix the ephemeral build metrics --- buildman/manager/ephemeral.py | 2 +- buildman/manager/executor.py | 2 +- util/metrics/metricqueue.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildman/manager/ephemeral.py b/buildman/manager/ephemeral.py index f026b61d9..3892e4bba 100644 --- a/buildman/manager/ephemeral.py +++ b/buildman/manager/ephemeral.py @@ -475,7 +475,7 @@ class EphemeralBuilderManager(BaseManager): try: metric_queue.put_deprecated('EphemeralBuilderStarted', 1, unit='Count') - metric_queue.ephemeral_build_workers.Inc(labelvalues=[execution_id, build_uuid]) + metric_queue.ephemeral_build_workers.Inc() except: logger.exception('Exception when writing start metrics for execution %s for job %s', execution_id, build_uuid) diff --git a/buildman/manager/executor.py b/buildman/manager/executor.py index fd5c99a7e..f09ce8d69 100644 --- a/buildman/manager/executor.py +++ b/buildman/manager/executor.py @@ -197,7 +197,7 @@ class EC2Executor(BuilderExecutor): except boto.exception.EC2ResponseError as ec2e: logger.exception('Unable to spawn builder instance') metric_queue.put_deprecated('EC2BuildStartFailure', 1, unit='Count') - metric_queue.ephemeral_build_worker_failure.Inc(labelvalues=[build_uuid]) + metric_queue.ephemeral_build_worker_failure.Inc() raise ec2e if not reservation.instances: diff --git a/util/metrics/metricqueue.py b/util/metrics/metricqueue.py index a27dd28ed..caf065ea5 100644 --- a/util/metrics/metricqueue.py +++ b/util/metrics/metricqueue.py @@ -50,9 +50,9 @@ class MetricQueue(object): self.percent_building = prom.create_gauge('build_percent_building', 'Percent building.') self.build_counter = prom.create_counter('builds', 'Number of builds', labelnames=['name']) self.ephemeral_build_workers = prom.create_counter('ephemeral_build_workers', - 'Number of started ephemeral build workers', labelnames=['name', 'build_uuid']) + 'Number of started ephemeral build workers') self.ephemeral_build_worker_failure = prom.create_counter('ephemeral_build_worker_failure', - 'Number of failed-to-start ephemeral build workers', labelnames=['build_uuid']) + 'Number of failed-to-start ephemeral build workers') self.work_queue_running = prom.create_gauge('work_queue_running', 'Running items in a queue', labelnames=['queue_name'])