2021-04-06 02:09:00 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
class UsageDataNonSqlMetrics < ::API::Base
|
|
|
|
before { authenticated_as_admin! }
|
|
|
|
|
2021-07-06 14:08:17 -04:00
|
|
|
feature_category :service_ping
|
2021-04-06 02:09:00 -04:00
|
|
|
|
|
|
|
namespace 'usage_data' do
|
|
|
|
before do
|
|
|
|
not_found! unless Feature.enabled?(:usage_data_non_sql_metrics, default_enabled: :yaml, type: :ops)
|
|
|
|
end
|
|
|
|
|
|
|
|
desc 'Get Non SQL usage ping metrics' do
|
|
|
|
detail 'This feature was introduced in GitLab 13.11.'
|
|
|
|
end
|
|
|
|
|
|
|
|
get 'non_sql_metrics' do
|
|
|
|
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/325534')
|
|
|
|
|
2022-02-08 10:12:33 -05:00
|
|
|
data = Gitlab::Usage::ServicePingReport.for(output: :non_sql_metrics_values)
|
2021-04-06 02:09:00 -04:00
|
|
|
|
|
|
|
present data
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|