Commit dda8ff61 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'psk-add-billable-users-to-usage-ping' into 'master'

Add billable_users metric to Usage Ping

See merge request gitlab-org/gitlab!62850
parents fa007604 e5ab277f
...@@ -7174,6 +7174,18 @@ Status: `data_available` ...@@ -7174,6 +7174,18 @@ Status: `data_available`
Tiers: `free` Tiers: `free`
### `license_billable_users`
Number of all billable users (active users excluding bots and guests).
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/license/20210531204603_license_billable_users.yml)
Group: `group::product intelligence`
Status: `implemented`
Tiers: `premium`, `ultimate`
### `license_expires_at` ### `license_expires_at`
The date the license ends The date the license ends
......
---
key_path: license_billable_users
name: billable_users
description: Number of all billable users (active users excluding bots and guests).
product_section: growth
product_stage: growth
product_group: group::product intelligence
product_category: collection
value_type: number
status: implemented
milestone: "14.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62850
time_frame: all
data_source: database
distribution:
- ee
tier:
- premium
- ultimate
...@@ -97,6 +97,7 @@ module EE ...@@ -97,6 +97,7 @@ module EE
# rubocop: enable UsageData/LargeTable # rubocop: enable UsageData/LargeTable
usage_data[:licensee] = license.licensee usage_data[:licensee] = license.licensee
usage_data[:license_user_count] = license.restricted_user_count usage_data[:license_user_count] = license.restricted_user_count
usage_data[:license_billable_users] = alt_usage_data { license.daily_billable_users_count }
usage_data[:license_starts_at] = license.starts_at usage_data[:license_starts_at] = license.starts_at
usage_data[:license_expires_at] = license.expires_at usage_data[:license_expires_at] = license.expires_at
usage_data[:license_plan] = license.plan usage_data[:license_plan] = license.plan
......
...@@ -15,7 +15,7 @@ RSpec.describe Gitlab::UsageDataNonSqlMetrics do ...@@ -15,7 +15,7 @@ RSpec.describe Gitlab::UsageDataNonSqlMetrics do
described_class.uncached_data described_class.uncached_data
end end
expect(recorder.count).to eq(52) expect(recorder.count).to eq(54)
end end
end end
end end
...@@ -79,6 +79,7 @@ RSpec.describe Gitlab::UsageData do ...@@ -79,6 +79,7 @@ RSpec.describe Gitlab::UsageData do
elasticsearch_enabled elasticsearch_enabled
geo_enabled geo_enabled
license_trial_ends_on license_trial_ends_on
license_billable_users
)) ))
end end
...@@ -180,6 +181,7 @@ RSpec.describe Gitlab::UsageData do ...@@ -180,6 +181,7 @@ RSpec.describe Gitlab::UsageData do
expect(subject[:license_add_ons]).to eq(license.add_ons) expect(subject[:license_add_ons]).to eq(license.add_ons)
expect(subject[:license_trial]).to eq(license.trial?) expect(subject[:license_trial]).to eq(license.trial?)
expect(subject[:license_subscription_id]).to eq(license.subscription_id) expect(subject[:license_subscription_id]).to eq(license.subscription_id)
expect(subject[:license_billable_users]).to eq(license.daily_billable_users_count)
end end
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