Fix the ephemeral build metrics
This commit is contained in:
parent
808266574e
commit
dd5f7cbe6c
3 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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'])
|
||||
|
|
Reference in a new issue