Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/metrics/web_transaction.rb')
-rw-r--r--lib/gitlab/metrics/web_transaction.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/metrics/web_transaction.rb b/lib/gitlab/metrics/web_transaction.rb
index 2064f9290d3..1811389a744 100644
--- a/lib/gitlab/metrics/web_transaction.rb
+++ b/lib/gitlab/metrics/web_transaction.rb
@@ -66,9 +66,10 @@ module Gitlab
if route
path = endpoint_paths_cache[route.request_method][route.path]
- # Feature categories will be added for grape endpoints in
- # https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/462
- { controller: 'Grape', action: "#{route.request_method} #{path}", feature_category: '' }
+ grape_class = endpoint.options[:for]
+ feature_category = grape_class.try(:feature_category_for_app, endpoint).to_s
+
+ { controller: 'Grape', action: "#{route.request_method} #{path}", feature_category: feature_category }
end
end