Commit 60bd0a24 authored by Victor Zagorodny's avatar Victor Zagorodny

Add user_preferences_usage to usage ping

parent 885e2a9c
...@@ -90,7 +90,10 @@ module Gitlab ...@@ -90,7 +90,10 @@ module Gitlab
todos: count(Todo), todos: count(Todo),
uploads: count(Upload), uploads: count(Upload),
web_hooks: count(WebHook) web_hooks: count(WebHook)
}.merge(services_usage).merge(approximate_counts) }
.merge(services_usage)
.merge(approximate_counts)
.merge(user_preferences: user_preferences_usage)
} }
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
...@@ -159,6 +162,10 @@ module Gitlab ...@@ -159,6 +162,10 @@ module Gitlab
} }
end end
def user_preferences_usage
{} # augmented in EE
end
def count(relation, fallback: -1) def count(relation, fallback: -1)
relation.count relation.count
rescue ActiveRecord::StatementInvalid rescue ActiveRecord::StatementInvalid
......
...@@ -124,6 +124,7 @@ describe Gitlab::UsageData do ...@@ -124,6 +124,7 @@ describe Gitlab::UsageData do
todos todos
uploads uploads
web_hooks web_hooks
user_preferences
)) ))
end end
......
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