diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/usage/metrics/names_suggestions/generator.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/usage/metrics/names_suggestions/generator.rb')
-rw-r--r-- | lib/gitlab/usage/metrics/names_suggestions/generator.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/usage/metrics/names_suggestions/generator.rb b/lib/gitlab/usage/metrics/names_suggestions/generator.rb index a669b43f395..b47dc5689d4 100644 --- a/lib/gitlab/usage/metrics/names_suggestions/generator.rb +++ b/lib/gitlab/usage/metrics/names_suggestions/generator.rb @@ -10,6 +10,12 @@ module Gitlab uncached_data.deep_stringify_keys.dig(*key_path.split('.')) end + def add_metric(metric, time_frame: 'none') + metric_class = "Gitlab::Usage::Metrics::Instrumentations::#{metric}".constantize + + metric_class.new(time_frame: time_frame).suggested_name + end + private def count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil) |