diff --git a/config/metrics/schema.json b/config/metrics/schema.json index 0ce5a163184b5afb2fbad952578e99714d7d40f6..59918314e5e8581bf5ed57e77e46dd68a636406f 100644 --- a/config/metrics/schema.json +++ b/config/metrics/schema.json @@ -72,6 +72,13 @@ "enum": ["ee", "ce"] } }, + "performance_indicator_type": { + "type": "array", + "items": { + "type": "string", + "enum": ["gmau", "smau", "paid_gmau", "umau"] + } + }, "tier": { "type": "array", "items": { diff --git a/doc/development/service_ping/metrics_dictionary.md b/doc/development/service_ping/metrics_dictionary.md index 9d668f37e79f11774aee66386d9c8ec370fa41f2..5dec8d53079c27b2e36a871104900350d8de3104 100644 --- a/doc/development/service_ping/metrics_dictionary.md +++ b/doc/development/service_ping/metrics_dictionary.md @@ -40,6 +40,7 @@ Each metric is defined in a separate YAML file consisting of a number of fields: | `data_category` | yes | `string`; [categories](#data-category) of the metric, may be set to `Operational`, `Optional`, `Subscription`, `Standard`. The default value is `Optional`.| | `instrumentation_class` | no | `string`; [the class that implements the metric](metrics_instrumentation.md). | | `distribution` | yes | `array`; may be set to one of `ce, ee` or `ee`. The [distribution](https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/#definitions) where the tracked feature is available. | +| `performance_indicator_type` | no | `array`; may be set to one of [`gmau`, `smau`, `paid_gmau`, or `umau`](https://about.gitlab.com/handbook/business-technology/data-team/data-catalog/xmau-analysis/). | | `tier` | yes | `array`; may be set to one of `free, premium, ultimate`, `premium, ultimate` or `ultimate`. The [tier]( https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/) where the tracked feature is available. | | `milestone` | no | The milestone when the metric is introduced. | | `milestone_removed` | no | The milestone when the metric is removed. | diff --git a/generator_templates/usage_metric_definition/metric_definition.yml b/generator_templates/usage_metric_definition/metric_definition.yml index 209ff628eb57b51030c1af10eadda21d5272740c..8dc7db146eb7b1b2ed00813801cb3e8bba6440a1 100644 --- a/generator_templates/usage_metric_definition/metric_definition.yml +++ b/generator_templates/usage_metric_definition/metric_definition.yml @@ -12,6 +12,7 @@ introduced_by_url: time_frame: <%= time_frame %> data_source: data_category: Optional +performance_indicator_type: distribution: <%= distribution %> tier: diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml index f694e6173200e348b6cf796a5eacc1a61e056627..af5704f7d01b9a7f2620cd850c7f42f65942a079 100644 --- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml +++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml @@ -13,6 +13,7 @@ introduced_by_url: time_frame: 7d data_source: data_category: Operational +performance_indicator_type: distribution: - ce # Add here corresponding tiers diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml index 9de4d2a5644418025486e00202ffa9314e24272f..6f4e2b3f9eed5a028ce8db1e2d0de37849ca5147 100644 --- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml +++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml @@ -13,6 +13,7 @@ introduced_by_url: time_frame: 7d data_source: data_category: Optional +performance_indicator_type: distribution: - ee tier: diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml index 0e7de369c82e00d2d6b541068ceee1858d7f54f4..a0e5ea799a5a2a23a528f712f1a73a75e6587eaa 100644 --- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml +++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml @@ -14,6 +14,7 @@ introduced_by_url: time_frame: 7d data_source: data_category: Optional +performance_indicator_type: distribution: - ce - ee