Rename timers for external services to share namespace.

This moves the cloudsearch and geoip timers into a common namespace to
clean up graphite and make it more clear what they are:

* cloudsearch_timer -> providers.cloudsearch
* geoip_service_timer -> providers.geoip.*
This commit is contained in:
Neil Williams
2015-04-13 12:20:33 -07:00
parent ad45014329
commit 21ab74fb57
2 changed files with 2 additions and 2 deletions

View File

@@ -748,7 +748,7 @@ def basic_query(query=None, bq=None, faceting=None, size=1000,
path = _encode_query(query, bq, faceting, size, start, rank, return_fields)
timer = None
if record_stats:
timer = g.stats.get_timer("cloudsearch_timer")
timer = g.stats.get_timer("providers.cloudsearch")
timer.start()
connection = httplib.HTTPConnection(search_api, port=80, timeout=_TIMEOUT)
try:

View File

@@ -98,7 +98,7 @@ def get_request_location():
pass
elif getattr(request, 'ip', None):
g.stats.simple_event('geoip.non_cdn_request')
timer = g.stats.get_timer("geoip_service_timer")
timer = g.stats.get_timer("providers.geoip.location_by_ips")
timer.start()
location = location_by_ips(request.ip)
if location: