diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/gitlab/metrics | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/gitlab/metrics')
-rw-r--r-- | lib/gitlab/metrics/instrumentation.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/metrics/subscribers/rack_attack.rb | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/metrics/instrumentation.rb b/lib/gitlab/metrics/instrumentation.rb index 66361529546..ad45a037161 100644 --- a/lib/gitlab/metrics/instrumentation.rb +++ b/lib/gitlab/metrics/instrumentation.rb @@ -153,6 +153,10 @@ module Gitlab method_visibility = method_visibility_for(target, name) + # We silence warnings to avoid such warnings: + # `Skipping set of ruby2_keywords flag for <...> + # (method accepts keywords or method does not accept argument splat)` + # as we apply ruby2_keywords 'blindly' for every instrumented method. proxy_module.class_eval <<-EOF, __FILE__, __LINE__ + 1 def #{name}(#{args_signature}) if trans = Gitlab::Metrics::Instrumentation.transaction @@ -162,6 +166,7 @@ module Gitlab super end end + silence_warnings { ruby2_keywords(:#{name}) if respond_to?(:ruby2_keywords, true) } #{method_visibility} :#{name} EOF diff --git a/lib/gitlab/metrics/subscribers/rack_attack.rb b/lib/gitlab/metrics/subscribers/rack_attack.rb index 1c7767f5ca9..ebd0d1634e7 100644 --- a/lib/gitlab/metrics/subscribers/rack_attack.rb +++ b/lib/gitlab/metrics/subscribers/rack_attack.rb @@ -20,7 +20,9 @@ module Gitlab :throttle_authenticated_web, :throttle_authenticated_protected_paths_api, :throttle_authenticated_protected_paths_web, - :throttle_authenticated_packages_api + :throttle_authenticated_packages_api, + :throttle_authenticated_git_lfs, + :throttle_authenticated_files_api ].freeze PAYLOAD_KEYS = [ |