Create class for generating user data export file

Background

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/213615, we want to make it easier for air-gapped customers to provide user usage information to sales for renewals or true-ups. We'd like to provide customers with a push button approach to generating the necessary data which can be provided to sales.

Proposal

Implement a class responsible for generating a CSV export file. This CSV should include the following necessary information:

  1. Header information:
    1. license key
    2. email associated with the license
    3. start and end date of the license
    4. company name associated with the license
    5. Date/time generated
  2. Main information:
    1. Date the count was recorded
    2. active_users_count

Unknowns

  • A CSV file might be the easiest for consumption. Are there any requirements on format?
  • Should the export include all historical data? Just data for the current license? Just for the past year?