Add uuid to usage ping

parent a8441c99
module Gitlab
class UsageData
include Gitlab::CurrentSettings
class << self
def data(force_refresh: false)
Rails.cache.fetch('usage_data', force: force_refresh, expires_in: 2.weeks) { uncached_data }
......@@ -51,7 +53,8 @@ module Gitlab
end
def license_usage_data
usage_data = { version: Gitlab::VERSION,
usage_data = { uuid: current_application_settings.uuid,
version: Gitlab::VERSION,
active_user_count: User.active.count,
mattermost_enabled: Gitlab.config.mattermost.enabled }
......
......@@ -22,6 +22,7 @@ describe Gitlab::UsageData do
recorded_at
version
mattermost_enabled
uuid
))
end
......@@ -72,6 +73,7 @@ describe Gitlab::UsageData do
it "gathers license data" do
license = ::License.current
expect(subject[:uuid]).to eq(current_application_settings.uuid)
expect(subject[:license_md5]).to eq(Digest::MD5.hexdigest(license.data))
expect(subject[:version]).to eq(Gitlab::VERSION)
expect(subject[:licensee]).to eq(license.licensee)
......
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