diff options
Diffstat (limited to 'lib/gitlab/usage/metrics/instrumentations/edition_metric.rb')
-rw-r--r-- | lib/gitlab/usage/metrics/instrumentations/edition_metric.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/usage/metrics/instrumentations/edition_metric.rb b/lib/gitlab/usage/metrics/instrumentations/edition_metric.rb new file mode 100644 index 00000000000..83153242703 --- /dev/null +++ b/lib/gitlab/usage/metrics/instrumentations/edition_metric.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Gitlab + module Usage + module Metrics + module Instrumentations + class EditionMetric < GenericMetric + value do + if Gitlab.ee? + ::License.current&.edition || 'EE Free' + else + 'CE' + end + end + end + end + end + end +end |