Fix metrics
This commit is contained in:
parent
68c5384473
commit
07e23a34ed
1 changed files with 3 additions and 3 deletions
|
@ -544,9 +544,9 @@ class EphemeralBuilderManager(BaseManager):
|
|||
realm_data = yield From(self._etcd_client.read(self._etcd_realm_key(build_component.builder_realm)))
|
||||
parsed_realm_data = json.loads(realm_data.value)
|
||||
start_time = parsed_realm_data['start_time']
|
||||
metric_queue.builder_time_to_build(time.time() - start_time, labelvalues=[parsed_realm_data.get('executor_name', 'unknown')])
|
||||
except (KeyError, etcd.EtcdKeyError):
|
||||
logger.warning('Could not read realm key %s', build_component.builder_realm)
|
||||
metric_queue.builder_time_to_build.Observe(time.time() - start_time, labelvalues=[parsed_realm_data.get('executor_name', 'unknown')])
|
||||
except Exception:
|
||||
logger.exception("Could not write start metric for realm key %s", build_component.builder_realm)
|
||||
|
||||
try:
|
||||
# Clean up the bookkeeping for allowing any manager to take the job.
|
||||
|
|
Reference in a new issue