Commit 94ecbb26 authored by Kati Paizee's avatar Kati Paizee

Merge branch 'new-category-metrics-definition' into 'master'

Add data category to metrics definition

See merge request gitlab-org/gitlab!63856
parents 95103d16 343d5516
......@@ -57,6 +57,10 @@
"type": "string",
"enum": ["database", "redis", "redis_hll", "prometheus", "system", "license"]
},
"data_category": {
"type": "string",
"enum": ["Operational", "Optional", "Subscription", "Standard"]
},
"instrumentation_class": {
"type": "string",
"pattern": "^(([A-Z][a-z]+)+::)*(([A-Z]+[a-z]+)+)$"
......
......@@ -37,6 +37,7 @@ Each metric is defined in a separate YAML file consisting of a number of fields:
| `status` | yes | `string`; [status](#metric-statuses) of the metric, may be set to `data_available`, `implemented`, `not_used`, `deprecated`, `removed`, `broken`. |
| `time_frame` | yes | `string`; may be set to a value like `7d`, `28d`, `all`, `none`. |
| `data_source` | yes | `string`; may be set to a value like `database`, `redis`, `redis_hll`, `prometheus`, `system`. |
| `data_category` | yes | `string`; [categories](#data-category) of the metric, may be set to `Operational`, `Optional`, `Subscription`, `Standard`. |
| `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. |
| `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. |
......@@ -93,6 +94,15 @@ Metric name suggestions can contain two types of elements:
For a metric name to be valid, it must not include any prompt, and no fixed suggestions
should be changed.
### Data category
We use the following categories to classify a metric:
- `Operational`: Required data for operational purposes.
- `Optional`: Data that is optional to collect. This can be [enabled or disabled](../usage_ping/index.md#disable-usage-ping) in the Admin Area.
- `Subscription`: Data related to licensing.
- `Standard`: Standard set of identifiers that are included when collecting data.
### Metric name suggestion examples
#### Metric with `data_source: database`
......
......@@ -11,6 +11,7 @@ milestone: "<%= milestone %>"
introduced_by_url:
time_frame: <%= time_frame %>
data_source:
data_category: Operational
distribution:
<%= distribution %>
tier:
......
......@@ -12,6 +12,7 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
data_category: Operational
distribution:
- ce
# Add here corresponding tiers
......
......@@ -12,6 +12,7 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
data_category: Operational
distribution:
- ee
tier:
......
......@@ -13,6 +13,7 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
data_category: Operational
distribution:
- ce
- ee
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment