Commit 4679c209 authored by Gary Holtz's avatar Gary Holtz

Adding a better label to the over_highlight_size_limit metric

parent a10ad670
......@@ -11,9 +11,11 @@ module Gitlab
end
def self.too_large?(size)
return false unless size.to_i > Gitlab.config.extra['maximum_text_highlight_size_kilobytes']
file_size_limit = Gitlab.config.extra['maximum_text_highlight_size_kilobytes']
over_highlight_size_limit.increment(source: "text highlighter") if Feature.enabled?(:track_file_size_over_highlight_limit)
return false unless size.to_i > file_size_limit
over_highlight_size_limit.increment(source: "file size: #{file_size_limit}") if Feature.enabled?(:track_file_size_over_highlight_limit)
true
end
......
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