Commit 7476bacb authored by Robert May's avatar Robert May

Update page limiter prometheus output

Now just stores a boolean of whether it was a bot or not.
parent 81786aa3
......@@ -91,10 +91,12 @@ module PageLimiter
# Record the page limit being hit in Prometheus
def record_interception
dd = DeviceDetector.new(request.user_agent)
Gitlab::Metrics.counter(:gitlab_page_out_of_bounds,
controller: params[:controller],
action: params[:action],
agent: request.user_agent
bot: dd.bot?
)
end
end
......@@ -170,7 +170,7 @@ describe PageLimiter do
:gitlab_page_out_of_bounds,
controller: "explore/projects",
action: "index",
agent: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
bot: true
)
subject
......
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