diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-19 11:34:58 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-19 11:34:58 +0300 |
commit | ac4b954c5fabbfa98fb72d88526a30713a20af5d (patch) | |
tree | a1fccb6ca951e96374e54872b548f160decd034b /lib/gitlab/auth | |
parent | 416076610e7b1674669ad33bae604155f55a3d02 (diff) |
Rename authentication activity observer methods
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r-- | lib/gitlab/auth/activity.rb | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/gitlab/auth/activity.rb b/lib/gitlab/auth/activity.rb index c0254ca81cd..b8a0979ac35 100644 --- a/lib/gitlab/auth/activity.rb +++ b/lib/gitlab/auth/activity.rb @@ -39,28 +39,18 @@ module Gitlab self.class.user_session_fetched_counter.increment end - def user_set_manually! + def user_session_override! self.class.user_session_override_counter.increment end - def user_logout! + def user_signed_out! self.class.user_signed_out_counter.increment end - class StubCounter - def initialize(metric) - Rails.logger.warn("METRIC #{metric}") - end - - def increment - end - end - COUNTERS.each_pair do |metric, description| define_singleton_method("#{metric}_counter") do strong_memoize(metric) do - StubCounter.new(metric) - # Gitlab::Metrics.counter("gitlab_auth_#{metric}_total", description) + Gitlab::Metrics.counter("gitlab_auth_#{metric}_total".to_sym, description) end end end |