Documentation: Update Usage Ping metric implementation guidelines
Background
Recently naming suggestion was introduced to help everyone select well defined name for their metric. Using name suggestion for metric should be included in to new metric implementation guide https://docs.gitlab.com/ee/development/usage_ping/index.html#developing-and-testing-usage-ping and also product intelligence reviewers should be advocated to suggest that during product intelligence reviews, therefore we should also update https://docs.gitlab.com/ee/development/usage_ping/product_intelligence_review.html
Goal
- Add instruction how to use name suggestion for naming metric at https://docs.gitlab.com/ee/development/usage_ping/index.html#developing-and-testing-usage-ping. Required steps that should be described:
- Update https://docs.gitlab.com/ee/development/usage_ping/product_intelligence_review.html with advise to suggest applying newly added guidance about naming during product intelligence reviews
How to use name suggestion
Right now we have the an egg and a chicken problem. In order to generate metric name suggestion, metric has to be instrumented at provided key_path
when generating metrics YAML, but we need to advise to retun back to instrumentation and update it, after getting metric name.
- Add metric instrumentation within
lib/gitalb/usage_data.rb
inside one of top level keys with any name of developer chosing - Run metrics YAML generator
- Using metric name suggestion to select correct metric name
- Updating instrumentation from 1st step and changing metric name to the one that follows suggestion
- Finally update metrics YAML with correct
key_path