Commit 9af1a77c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Update external requests logger threshold constant name

parent a86e1774
......@@ -6,10 +6,10 @@ module Gitlab
class Context
attr_reader :context
LOG_SAVEPOINTS_THRESHOLD = 1 # 1 `SAVEPOINT` created in a transaction
LOG_DURATION_S_THRESHOLD = 120 # transaction that is running for 2 minutes or longer
LOG_EXTERNAL_HTTP_COUNT_THRESHOLD = 50 # 50 external HTTP requests executed within transaction
LOG_EXTERNAL_HTTP_TOTAL_DURATION_S = 1 # 1 second spent in HTTP requests in total within transaction
LOG_SAVEPOINTS_THRESHOLD = 1 # 1 `SAVEPOINT` created in a transaction
LOG_DURATION_S_THRESHOLD = 120 # transaction that is running for 2 minutes or longer
LOG_EXTERNAL_HTTP_COUNT_THRESHOLD = 50 # 50 external HTTP requests executed within transaction
LOG_EXTERNAL_HTTP_DURATION_S_THRESHOLD = 1 # 1 second spent in HTTP requests in total within transaction
LOG_THROTTLE_DURATION = 1
def initialize
......@@ -66,7 +66,7 @@ module Gitlab
def external_http_requests_threshold_exceeded?
external_http_requests_count >= LOG_EXTERNAL_HTTP_COUNT_THRESHOLD ||
external_http_requests_duration >= LOG_EXTERNAL_HTTP_TOTAL_DURATION_S
external_http_requests_duration >= LOG_EXTERNAL_HTTP_DURATION_S_THRESHOLD
end
def should_log?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment