Permalink
Browse files

Add site-specific IaaS metrics

  • Loading branch information...
1 parent cd8277f commit b8d9afd091a56046bc570d7f8f2ca739991e2bd5 @priteau priteau committed Mar 27, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 epu/provisioner/core.py
View
@@ -459,6 +459,8 @@ def _launch_one_group(self, spec, nodes, caller=None):
try:
self.statsd_client.timing('provisioner.run_instances.timing', (after - before) * 1000)
self.statsd_client.incr('provisioner.run_instances.count')
+ self.statsd_client.timing('provisioner.run_instances.%s.timing' % site_name, (after - before) * 1000)
+ self.statsd_client.incr('provisioner.run_instances.%s.count' % site_name)
except:
log.exception("Failed to submit metrics")
except timeout, t:
@@ -675,6 +677,8 @@ def _query_one_site(self, site, nodes, caller=None):
try:
self.statsd_client.timing('provisioner.list_instances.timing', (after - before) * 1000)
self.statsd_client.incr('provisioner.list_instances.count')
+ self.statsd_client.timing('provisioner.list_instances.%s.timing' % site, (after - before) * 1000)
+ self.statsd_client.incr('provisioner.list_instances.%s.count' % site)
except:
log.exception("Failed to submit metrics")
except timeout:

0 comments on commit b8d9afd

Please sign in to comment.