Add metrics yml files for usage data metrics definition
Add *_metrics.yml
file for usage data metrics definition, equivalent to Event dictionary we have now.
We have now 1210 metrics in Event Dictionary
Consider how feature flags yml is working, could be similar
Proposal
- Use one file per metric.
- Store them under individual
lib/gitlab/usage_data/metrics/.._metrics.yml
withee/lib/ee/gitlab/usage_data/metrics/.._metrics.yml
for metric in ee - Consider split per type in separate folders,
count_all
,count_weekly
,count_monthly
,licence
,settings
Notes
-
full_path
should be unique, full_path is defining where the metric is placed in usage_data json payload - define metrics name format, standardization Naming and placing the metrics
- start with metrics that are owned by groupproduct analytics
- This metrics definition files can be also sent to version-app and we could use then for mapping
Questions
-
Current event dictionary has 1210 lines. Do we want to have 1210 metric yml definitions. What would this mean for the dictionary dictionary.json
generated?
Next steps
-
Add basic support for usage data metrics definition !49126 (merged) -
Add documentation !50770 (merged) -
Add ee
metrics definition !50990 (merged) -
Add rake task to generate metrics dictionary #294397 (closed)
Metric definition schema https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/schema.json
Example
# Metric files location -> lib/gitlab/usage_data/metrics/count_all/boards.yml
key_path: counts_monthy.deployments
description: Total deployments
value_type: number
product_category:
stage:
status: data_available
milestone:
milestone_removed:
introduced_by_url:
group: 'group::ops release'
time_frame: c28d
data_source: database
distribution: [ee, ce]
tier: ['free', 'starter', 'premium', 'ultimate', 'bronze', 'silver', 'gold']
@gitlab-org/growth/product_analytics/engineers here is a proposal for metrics definition, please feel free to add and update with your feedback, thank you!
Edited by Alina Mihaila