Update HistoricalUserData::CsvService to Export add_on_metrics to Offline License Usage CSV
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Background
We currently track add-on metrics as part of seat link records for online cloud licenses to provide visibility into Duo seat adoption for Self-Managed customers.
Now that offline cloud license customers can purchase Duo Enterprise, we will need to capture this same adoption data from these users and ensure these metrics are part of the offline license data sharing process.
In order to allow the offline cloud license usage export file to contain these add-on metrics, we will need to start tracking this as part of GitLab's historical license data.
Proposal
- Update
HistoricalUserData::CsvServiceto save the add-on metrics as a new column to the CSV. This will require updating theheader_to_value_hash, for example:
def header_to_value_hash
{
'Date' => ->(historical_datum) { historical_datum.recorded_at.utc.to_fs(:csv) },
'Billable User Count' => 'active_user_count',
'Add-on Metrics' => 'add_on_metrics'
}
end
- Update the following documentation:
- Test the license usage export functionality both via the API and UI using historical license data for offline cloud licenses with and without add-on metrics. If needed, a new historical data record for the current day can be generated via Rails console with
HistoricalDataWorker.new.perform
Edited by 🤖 GitLab Bot 🤖