Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4d1a7f75
Commit
4d1a7f75
authored
Nov 30, 2020
by
Alina Mihaila
Committed by
Markus Koller
Nov 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable by default true in API helper usage_data_#{event} feature
parent
8bb7aacd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
changelogs/unreleased/267993-enable-by-default-true-in-api-helper-usage_data_-event-feature.yml
...-default-true-in-api-helper-usage_data_-event-feature.yml
+5
-0
config/feature_flags/development/usage_data_a_compliance_audit_events_api.yml
.../development/usage_data_a_compliance_audit_events_api.yml
+1
-1
config/feature_flags/development/usage_data_g_compliance_dashboard.yml
...e_flags/development/usage_data_g_compliance_dashboard.yml
+4
-4
lib/api/helpers.rb
lib/api/helpers.rb
+3
-2
No files found.
changelogs/unreleased/267993-enable-by-default-true-in-api-helper-usage_data_-event-feature.yml
0 → 100644
View file @
4d1a7f75
---
title
:
Enable by default usage data API tracking
merge_request
:
48607
author
:
type
:
added
config/feature_flags/development/usage_data_a_compliance_audit_events_api.yml
View file @
4d1a7f75
...
@@ -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
:
fals
e
default_enabled
:
tru
e
config/feature_flags/development/usage_data_g_compliance_dashboard.yml
View file @
4d1a7f75
...
@@ -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
:
fals
e
default_enabled
:
tru
e
lib/api/helpers.rb
View file @
4d1a7f75
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment