Don't alert on slow queries for /user_activity and /realm_activity.

(imported from commit 8b08ad47138477068f432ff15c56b2ba93ac2db6)
This commit is contained in:
Tim Abbott
2013-12-19 17:40:37 -05:00
parent d218ce3306
commit b5754758a7

View File

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