Commit f1e45425 authored by Piotr Skorupa's avatar Piotr Skorupa

Remove namespaces in metric definitions instrumentation_class

parent 7368e2a6
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: 28d
data_source: database
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountUsersCreatingIssuesMetric'
instrumentation_class: CountUsersCreatingIssuesMetric
distribution:
- ce
- ee
......
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: 28d
data_source: redis_hll
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountUsersUsingApproveQuickActionMetric'
instrumentation_class: CountUsersUsingApproveQuickActionMetric
distribution:
- ce
- ee
......
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: 7d
data_source: redis_hll
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountUsersUsingApproveQuickActionMetric'
instrumentation_class: CountUsersUsingApproveQuickActionMetric
distribution:
- ce
- ee
......
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: all
data_source: database
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountIssuesMetric'
instrumentation_class: CountIssuesMetric
distribution:
- ce
- ee
......
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: all
data_source: database
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountUsersCreatingIssuesMetric'
instrumentation_class: CountUsersCreatingIssuesMetric
distribution:
- ce
- ee
......
......@@ -9,7 +9,7 @@ value_type: number
status: data_available
time_frame: all
data_source: database
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::CountBoardsMetric'
instrumentation_class: CountBoardsMetric
distribution:
- ce
- ee
......
......@@ -11,7 +11,7 @@ milestone: "9.1"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1521
time_frame: none
data_source: database
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::UuidMetric'
instrumentation_class: UuidMetric
distribution:
- ee
- ce
......
......@@ -9,7 +9,7 @@ value_type: string
status: data_available
time_frame: none
data_source: system
instrumentation_class: 'Gitlab::Usage::Metrics::Instrumentations::HostnameMetric'
instrumentation_class: HostnameMetric
distribution:
- ce
- ee
......
......@@ -56,7 +56,7 @@
},
"instrumentation_class": {
"type": "string",
"pattern": "^(Gitlab::Usage::Metrics::Instrumentations::)(([A-Z][a-z]+)+::)*(([A-Z][a-z]+)+)$"
"pattern": "^(([A-Z][a-z]+)+::)*(([A-Z][a-z]+)+)$"
},
"distribution": {
"type": "array",
......
......@@ -9,7 +9,7 @@ module Gitlab
instrumentation_class = definition.attributes[:instrumentation_class]
if instrumentation_class.present?
metric_value = instrumentation_class.constantize.new(time_frame: definition.attributes[:time_frame]).value
metric_value = "Gitlab::Usage::Metrics::Instrumentations::#{instrumentation_class}".constantize.new(time_frame: definition.attributes[:time_frame]).value
metric_payload(definition.key_path, metric_value)
else
......
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