Skip to content
Snippets Groups Projects

Add EE usage ping

Merged Stan Hu requested to merge ee-usage-ping into master

This MR implements the EE usage ping as a sidekiq-cron async task as discussed in #380 (closed). Currently we report:

  • Active user count
  • Max historical active user count
  • License data (e.g. licensee, add-ons, etc.)

Screenshot:

image

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 18 body: data.to_json,
    19 headers: { 'Content-type' => 'application/json' }
    20 )
    21 end
    22
    23 def try_obtain_lease
    24 Gitlab::ExclusiveLease.new('gitlab_usage_ping_worker:ping', timeout: LEASE_TIMEOUT).try_obtain
    25 end
    26
    27 def data
    28 usage_data = { version: Gitlab::VERSION }
    29 usage_data[:active_users] = current_active_user_count
    30 license = License.current
    31
    32 if license
    33 usage_data[:historical_max_users] = max_historical_user_count
    • @stanhu What do you think about sending a fingerprint of the license data back to us, so that we can easily find the same license in the license app?

    • Author Owner

      That sounds like a great idea. I just added it. Do you think we should just nix the rest of the license data then?

      Edited by Stan Hu
    • Author Owner

      I'm going to keep the license data for now; it may be useful to compare notes.

  • @stanhu Approach looks good to me!

  • Reassigned to @stanhu

  • Stan Hu Added 1 commit:

    Added 1 commit:

    • 54efdba0 - Add license fingerprint and catch errors in HTTParty
  • Stan Hu Added 180 commits:

    Added 180 commits:

    • 54efdba0...1c04b072 - 175 commits from branch master
    • f493c9a8 - Add async task that reports EE usage every week
    • 56e6e8c5 - Add setting to disable usage ping
    • f8a1a274 - Add migration file for usage ping flag
    • 3d4fce06 - Get crontab format right
    • 1cbf3827 - Add license fingerprint and catch errors in HTTParty
  • Stan Hu Reassigned to @DouweM

    Reassigned to @DouweM

  • Stan Hu Added 1 commit:

    Added 1 commit:

    • fae2e268 - Add license fingerprint and catch errors in HTTParty
  • Stan Hu Added 1 commit:

    Added 1 commit:

    • 150aee0e - Add license fingerprint and catch errors in HTTParty
  • Stan Hu Added 1 commit:

    Added 1 commit:

    • 87973ebc - Rename usage_ping URL to usage_data
  • Stan Hu Added 1 commit:

    Added 1 commit:

    • 0a3f398a - Rename usage_ping URL to usage_data
  • Stan Hu Unmarked this merge request as a Work In Progress

    Unmarked this merge request as a Work In Progress

  • Stan Hu Added 1 commit:

    Added 1 commit:

    • 8d8c6ced - Be consistent and make active_users active_user_count
  • Stan Hu Reassigned to @stanhu

    Reassigned to @stanhu

  • Stan Hu Reassigned to @DouweM

    Reassigned to @DouweM

  • Stan Hu mentioned in issue #380 (closed)

    mentioned in issue #380 (closed)

  • Stan Hu Milestone changed to %8.10

    Milestone changed to %8.10

  • Stan Hu Added ~149424 label

    Added ~149424 label

  • Douwe Maan mentioned in commit 93273e15

    mentioned in commit 93273e15

  • Douwe Maan Status changed to merged

    Status changed to merged

  • Picked into 8-10-stable-ee, will go into 8.10.0-rc11.

  • Rémy Coutable Removed ~149424 label

    Removed ~149424 label

  • Douwe Maan mentioned in commit 7414d2c5

    mentioned in commit 7414d2c5

  • This MR misses a CHANGELOG item, are there customers which scan through the CHANGELOG and not the blog post? That would be my approach when I would update 2 or more releases?

  • Author Owner

    @zj Good point, I'll add that.

  • I'm waiting to sort out https://gitlab.com/gitlab-org/gitlab-ce/issues/20126 and then we can add docs about this.

  • mentioned in issue #338461 (closed)

  • Please register or sign in to reply
    Loading