Commit 8ddd04b3 authored by Alper Akgun's avatar Alper Akgun

Merge branch '267114-enable-usage_data_api-by-default-feature' into 'master'

Enable usage_data_api feature flag by default

See merge request gitlab-org/gitlab!45004
parents 0bd504f4 bb40f724
---
title: Enable usage_data_api feature flag by default
merge_request: 45004
author:
type: other
--- ---
name: usage_data_api name: usage_data_api
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41301 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/41301
rollout_issue_url: rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/267114
group: group::product analytics group: group::product analytics
type: development type: development
default_enabled: false default_enabled: true
...@@ -387,7 +387,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF ...@@ -387,7 +387,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
Increment unique users count using Redis HLL, for given event name. Increment unique users count using Redis HLL, for given event name.
Tracking events using the `UsageData` API requires the `usage_data_api` feature flag to be enabled, which is disabled by default. Tracking events using the `UsageData` API requires the `usage_data_api` feature flag to be enabled, which is enabled by default.
API requests are protected by checking for a valid CSRF token. API requests are protected by checking for a valid CSRF token.
......
...@@ -6,7 +6,7 @@ module API ...@@ -6,7 +6,7 @@ module API
namespace 'usage_data' do namespace 'usage_data' do
before do before do
not_found! unless Feature.enabled?(:usage_data_api) not_found! unless Feature.enabled?(:usage_data_api, default_enabled: true)
forbidden!('Invalid CSRF token is provided') unless verified_request? forbidden!('Invalid CSRF token is provided') unless verified_request?
end end
......
...@@ -45,7 +45,7 @@ module Gitlab ...@@ -45,7 +45,7 @@ module Gitlab
# made globally available to the frontend # made globally available to the frontend
push_frontend_feature_flag(:webperf_experiment, default_enabled: false) push_frontend_feature_flag(:webperf_experiment, default_enabled: false)
push_frontend_feature_flag(:snippets_binary_blob, default_enabled: false) push_frontend_feature_flag(:snippets_binary_blob, default_enabled: false)
push_frontend_feature_flag(:usage_data_api, default_enabled: false) push_frontend_feature_flag(:usage_data_api, default_enabled: true)
# Startup CSS feature is a special one as it can be enabled by means of cookies and params # Startup CSS feature is a special one as it can be enabled by means of cookies and params
gon.push({ features: { 'startupCss' => use_startup_css? } }, true) gon.push({ features: { 'startupCss' => use_startup_css? } }, true)
......
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