diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 15:07:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 15:07:48 +0300 |
commit | 7c41737ae53e3a237f356480ae04ec3ba182447b (patch) | |
tree | 766189eea19b2d44460a7e77dae19cd0b43d24f2 /lib/gitlab/usage_data_counters | |
parent | 44d4b37b52c678a0b6a3c18c8c87319553ce84a3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage_data_counters')
-rw-r--r-- | lib/gitlab/usage_data_counters/ci_template_unique_counter.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb index 1e8918c7c96..eb040e9e819 100644 --- a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb +++ b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb @@ -10,13 +10,17 @@ module Gitlab::UsageDataCounters expanded_template_name = expand_template_name(template) return unless expanded_template_name - Gitlab::UsageDataCounters::HLLRedisCounter.track_event( - ci_template_event_name(expanded_template_name, config_source), values: project.id - ) + event_name = ci_template_event_name(expanded_template_name, config_source) + Gitlab::UsageDataCounters::HLLRedisCounter.track_event(event_name, values: project.id) namespace = project.namespace if Feature.enabled?(:route_hll_to_snowplow, namespace) - Gitlab::Tracking.event(name, 'ci_templates_unique', namespace: namespace, user: user, project: project) + context = Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, + event: event_name).to_context + label = 'redis_hll_counters.ci_templates.ci_templates_total_unique_counts_monthly' + Gitlab::Tracking.event(name, 'ci_templates_unique', namespace: namespace, + project: project, context: [context], user: user, + label: label) end end |