Module: IncidentManagement::UsageData
- Includes:
- Gitlab::Utils::UsageData
- Included in:
- IssueLinks::CreateService, IssueLinks::DestroyService, Issues::BaseService, Notes::CreateService
- Defined in:
- app/services/concerns/incident_management/usage_data.rb
Constant Summary
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
Instance Method Summary collapse
Methods included from Gitlab::Utils::UsageData
#add, #add_metric, #alt_usage_data, #average, #count, #distinct_count, #estimate_batch_distinct_count, #histogram, #maximum_id, #measure_duration, #minimum_id, #redis_usage_data, #sum, #track_usage_event, #with_finished_at, #with_metadata, #with_prometheus_client
Instance Method Details
#track_incident_action(current_user, target, action) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/services/concerns/incident_management/usage_data.rb', line 7 def track_incident_action(current_user, target, action) return unless target.incident_type_issue? event = "incident_management_#{action}" track_usage_event(event, current_user.id) namespace = target.try(:namespace) project = target.try(:project) Gitlab::Tracking.event( self.class.to_s, event, project: project, namespace: namespace, user: current_user, label: 'redis_hll_counters.incident_management.incident_management_total_unique_counts_monthly', context: [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, event: event).to_context] ) end |