Skip to content

Merge new metrics implemented with Instrumentation classes to Usage Ping [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

Proposal to use instrumentation classes

Merge Instrumented metrics to usage ping

  - Add feature flag usage_data_instrumentation
  - Merge metrics generated using instrumentation
  classes to usage ping generated using
  usage_data.rb

Using a feature flag to first have the chance that this works correct and doesn't break the usage ping in the current state.

A couple of metrics values are overriten by values generated using Gitlab::UsageDataMetrics.uncached_data

When we remove the feature flag we could remove the implementation from usage_data.rb and only use the one from instrumentation classes.

Metrics overitten now are

{
  :usage_activity_by_stage=>
  {
    :plan=>{:issues=>172944}
  }, 
  :counts=>
  {
    :boards=>261010, 
    :issues=>6343079
  }, 
  :redis_hll_counters=>
  {
  :quickactions=>
  {
    :i_quickactions_approve_weekly=>0, 
    :i_quickactions_approve_monthly=>0
  }
  }, 
  :uuid=>"ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b7f", 
  :hostname=>"staging.gitlab.com", 
  :usage_activity_by_stage_monthly=>
  {
    :plan=>
    {
    :issues=>12
    }
  }
}

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #326426 (closed)

Edited by Alina Mihaila

Merge request reports