Class: Gitlab::UsageDataNonSqlMetrics

Inherits:
UsageData
  • Object
show all
Defined in:
lib/gitlab/usage_data_non_sql_metrics.rb

Constant Summary collapse

SQL_METRIC_DEFAULT =
-3

Constants inherited from UsageData

Gitlab::UsageData::CE_MEMOIZED_VALUES, Gitlab::UsageData::DEPRECATED_VALUE, Gitlab::UsageData::MAX_GENERATION_TIME_FOR_SAAS

Constants included from Gitlab::Usage::TimeFrame

Gitlab::Usage::TimeFrame::ALL_TIME_TIME_FRAME_NAME, Gitlab::Usage::TimeFrame::SEVEN_DAYS_TIME_FRAME_NAME, Gitlab::Usage::TimeFrame::TWENTY_EIGHT_DAYS_TIME_FRAME_NAME

Constants included from Gitlab::Utils::UsageData

Gitlab::Utils::UsageData::DISTRIBUTED_HLL_FALLBACK, Gitlab::Utils::UsageData::FALLBACK, Gitlab::Utils::UsageData::HISTOGRAM_FALLBACK, Gitlab::Utils::UsageData::MAX_BUCKET_SIZE

Class Method Summary collapse

Methods inherited from UsageData

action_monthly_active_users, aggregated_metrics_data, analytics_unique_visits_data, compliance_unique_visits_data, components_usage_data, container_expiration_policies_usage, data, features_usage_data, features_usage_data_ce, grafana_embed_usage_data, installation_type, jira_import_usage, jira_usage, license_usage_data, merge_requests_users, object_store_config, object_store_usage_data, operating_system, recorded_at, redis_hll_counters, runners_usage, search_unique_visits_data, services_usage, successful_deployments_with_cluster, system_usage_data, system_usage_data_license, system_usage_data_monthly, system_usage_data_settings, system_usage_data_weekly, topology_usage_data, usage_activity_by_stage, usage_activity_by_stage_configure, usage_activity_by_stage_create, usage_activity_by_stage_enablement, usage_activity_by_stage_manage, usage_activity_by_stage_monitor, usage_activity_by_stage_package, usage_activity_by_stage_plan, usage_activity_by_stage_release, usage_activity_by_stage_secure, usage_activity_by_stage_verify, usage_counters, usage_data_counters, user_preferences_usage, with_duration

Methods included from Gitlab::Usage::TimeFrame

#monthly_time_range, #monthly_time_range_db_params, #weekly_time_range

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods included from Gitlab::Utils::UsageData

#add, #add_metric, #alt_usage_data, #count, #distinct_count, #epics_deepest_relationship_level, #estimate_batch_distinct_count, #histogram, #jira_integration_data, #maximum_id, #measure_duration, #minimum_id, #redis_usage_data, #sum, #track_usage_event, #with_duration, #with_finished_at, #with_prometheus_client

Class Method Details

.add_metric(metric, time_frame: 'none', options: {}) ⇒ Object


8
9
10
11
12
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 8

def add_metric(metric, time_frame: 'none', options: {})
  metric_class = "Gitlab::Usage::Metrics::Instrumentations::#{metric}".constantize

  metric_class.new(time_frame: time_frame, options: options).instrumentation
end

.count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil) ⇒ Object


14
15
16
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 14

def count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil)
  SQL_METRIC_DEFAULT
end

.distinct_count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil) ⇒ Object


18
19
20
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 18

def distinct_count(relation, column = nil, batch: true, batch_size: nil, start: nil, finish: nil)
  SQL_METRIC_DEFAULT
end

.estimate_batch_distinct_count(relation, column = nil, batch_size: nil, start: nil, finish: nil) ⇒ Object


22
23
24
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 22

def estimate_batch_distinct_count(relation, column = nil, batch_size: nil, start: nil, finish: nil)
  SQL_METRIC_DEFAULT
end

.histogram(relation, column, buckets:, bucket_size: buckets.size) ⇒ Object


30
31
32
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 30

def histogram(relation, column, buckets:, bucket_size: buckets.size)
  SQL_METRIC_DEFAULT
end

.jira_integration_dataObject


40
41
42
43
44
45
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 40

def jira_integration_data
  {
    projects_jira_server_active: 0,
    projects_jira_cloud_active: 0
  }
end

.maximum_id(model, column = nil) ⇒ Object


34
35
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 34

def maximum_id(model, column = nil)
end

.minimum_id(model, column = nil) ⇒ Object


37
38
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 37

def minimum_id(model, column = nil)
end

.sum(relation, column, batch_size: nil, start: nil, finish: nil) ⇒ Object


26
27
28
# File 'lib/gitlab/usage_data_non_sql_metrics.rb', line 26

def sum(relation, column, batch_size: nil, start: nil, finish: nil)
  SQL_METRIC_DEFAULT
end