Commit 7090019c authored by Markus Koller's avatar Markus Koller

Merge branch '267993-enable-by-default-true-in-api-helper-usage_data_-event-feature' into 'master'

Enable by default true in API helper usage_data_#{event} feature

See merge request gitlab-org/gitlab!48607
parents 42331229 4d1a7f75
---
title: Enable by default usage data API tracking
merge_request: 48607
author:
type: added
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/233786 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/233786
milestone: '13.4' milestone: '13.4'
type: development type: development
group: group::compliance group: group::compliance
default_enabled: false default_enabled: true
...@@ -5,4 +5,4 @@ rollout_issue_url: ...@@ -5,4 +5,4 @@ rollout_issue_url:
milestone: milestone:
type: development type: development
group: group::compliance group: group::compliance
default_enabled: false default_enabled: true
...@@ -550,8 +550,9 @@ module API ...@@ -550,8 +550,9 @@ module API
def increment_unique_values(event_name, values) def increment_unique_values(event_name, values)
return unless values.present? return unless values.present?
feature_name = "usage_data_#{event_name}" feature_flag = "usage_data_#{event_name}"
return unless Feature.enabled?(feature_name)
return unless Feature.enabled?(feature_flag, default_enabled: true)
Gitlab::UsageDataCounters::HLLRedisCounter.track_event(values, event_name) Gitlab::UsageDataCounters::HLLRedisCounter.track_event(values, event_name)
rescue => error rescue => error
......
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