Ignore slow queries on certain non-customer-facing URLs.

(imported from commit c3f53883d93a75d805b15f617f391ccd1a492ce8)
This commit is contained in:
Tim Abbott 2013-12-19 15:02:37 -05:00
parent e77b34ed82
commit 66e72d4705
1 changed files with 3 additions and 1 deletions

View File

@ -160,7 +160,9 @@ def write_log_line(log_data, path, method, remote_ip, email, client_name,
logger_timing, extra_request_data, logger_client)
logger.info(logger_line)
if time_delta >= 1:
if time_delta >= 1 and path not in ["/activity",
"/json/report_error",
"/api/v1/deployments/report_error"]:
queue_json_publish("slow_queries", "%s (%s)" % (logger_timing, email), lambda e: None)
if settings.PROFILE_ALL_REQUESTS: