2021-09-30 23:02:18 +05:30
---
2022-08-13 15:12:31 +05:30
stage: Analytics
2023-06-20 00:43:36 +05:30
group: Analytics Instrumentation
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2021-09-30 23:02:18 +05:30
---
# Service Ping review guidelines
This page includes introductory material for a
2023-07-09 08:55:56 +05:30
[Analytics Instrumentation ](https://about.gitlab.com/handbook/engineering/development/analytics/analytics-instrumentation/ )
2021-09-30 23:02:18 +05:30
review, and is specific to Service Ping related reviews. For broader advice and
general best practices for code reviews, refer to our [code review guide ](../code_review.md ).
## Resources for reviewers
- [Service Ping Guide ](index.md )
2022-04-04 11:22:00 +05:30
- [Metrics Dictionary ](https://metrics.gitlab.com/ )
2021-09-30 23:02:18 +05:30
## Review process
2023-07-09 08:55:56 +05:30
We recommend a Analytics Instrumentation review when a merge request (MR) touches
2021-09-30 23:02:18 +05:30
any of the following Service Ping files:
- `usage_data*` files.
- The Metrics Dictionary, including files in:
- [`config/metrics` ](https://gitlab.com/gitlab-org/gitlab/-/tree/master/config/metrics ).
- [`ee/config/metrics` ](https://gitlab.com/gitlab-org/gitlab/-/tree/master/ee/config/metrics ).
- [`schema.json` ](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/schema.json ).
2023-07-09 08:55:56 +05:30
- Analytics Instrumentation tooling. For example,
2021-09-30 23:02:18 +05:30
[`Gitlab::UsageMetricDefinitionGenerator` ](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/generators/gitlab/usage_metric_definition_generator.rb )
### Roles and process
#### The merge request **author** should
2023-07-09 08:55:56 +05:30
- Decide whether a Analytics Instrumentation review is needed. You can skip the Analytics Instrumentation
review and remove the labels if the changes are not related to the Analytics Instrumentation domain and
2021-10-27 15:23:28 +05:30
are regular backend changes.
2023-07-09 08:55:56 +05:30
- If a Analytics Instrumentation review is needed, add the labels
`~analytics instrumentation` and `~analytics instrumentation::review pending` .
- For merge requests authored by Analytics Instrumentation team members:
- Assign both the `~backend` and `~analytics instrumentation` reviews to another Analytics Instrumentation team member.
- Assign the maintainer review to someone outside of the Analytics Instrumentation group.
2021-09-30 23:02:18 +05:30
- Assign an
2023-07-09 08:55:56 +05:30
[engineer ](https://gitlab.com/groups/gitlab-org/analytics-section/product-intelligence/engineers/-/group_members?with_inherited_permissions=exclude ) from the Analytics Instrumentation team for a review.
2021-09-30 23:02:18 +05:30
- Set the correct attributes in the metric's YAML definition:
2023-06-20 00:43:36 +05:30
- `product_section` , `product_stage` , `product_group`
2021-09-30 23:02:18 +05:30
- Provide a clear description of the metric.
- Add a changelog [according to guidelines ](../changelog.md ).
2023-07-09 08:55:56 +05:30
#### The Analytics Instrumentation **reviewer** should
2021-09-30 23:02:18 +05:30
- Perform a first-pass review on the merge request and suggest improvements to the author.
2022-05-07 20:08:51 +05:30
- Check the [metrics location ](metrics_dictionary.md#metric-key_path ) in
2021-09-30 23:02:18 +05:30
the Service Ping JSON payload.
2022-05-07 20:08:51 +05:30
- Suggest that the author checks the [naming suggestion ](metrics_dictionary.md#generate-a-metric-name-suggestion ) while
2021-10-27 15:23:28 +05:30
generating the metric's YAML definition.
2021-09-30 23:02:18 +05:30
- Add the `~database` label and ask for a [database review ](../database_review.md ) for
metrics that are based on Database.
2022-05-07 20:08:51 +05:30
- Add `~Data Warehouse::Impact Check` for any database metric that has a query change. Changes in queries can affect [data operations ](https://about.gitlab.com/handbook/business-technology/data-team/how-we-work/triage/#gitlabcom-db-structure-changes ).
2021-09-30 23:02:18 +05:30
- For tracking using Redis HLL (HyperLogLog):
2021-11-11 11:23:49 +05:30
- Check if a [feature flag is needed ](implement.md#recommendations ).
2021-09-30 23:02:18 +05:30
- For a metric's YAML definition:
- Check the metric's `description` .
- Check the metric's `key_path` .
2023-06-20 00:43:36 +05:30
- Check the `product_section` , `product_stage` , and `product_group` fields.
2021-09-30 23:02:18 +05:30
Read the [stages file ](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/stages.yml ).
- Check the file location. Consider the time frame, and if the file should be under `ee` .
- Check the tiers.
2023-04-23 21:23:45 +05:30
- If a metric was changed or removed: Make sure the MR author notified the Customer Success Ops team (`@csops-team`), Analytics Engineers (`@gitlab-data/analytics-engineers`), and Product Analysts (`@gitlab-data/product-analysts`) by `@` mentioning those groups in a comment on the issue for the MR and all of these groups have acknowledged the removal.
2021-10-27 15:23:28 +05:30
- Metrics instrumentations
- Recommend using metrics instrumentation for new metrics, [if possible ](metrics_instrumentation.md#support-for-instrumentation-classes ).
2023-07-09 08:55:56 +05:30
- Approve the MR, and relabel the MR with `~"analytics instrumentation::approved"` .
2021-09-30 23:02:18 +05:30
## Review workload distribution
2023-07-09 08:55:56 +05:30
[Danger bot ](../dangerbot.md ) adds the list of changed Analytics Instrumentation files
2021-09-30 23:02:18 +05:30
and pings the
2022-08-27 11:52:29 +05:30
[`@gitlab-org/analytics-section/product-intelligence/engineers` ](https://gitlab.com/groups/gitlab-org/analytics-section/product-intelligence/engineers/-/group_members?with_inherited_permissions=exclude ) group for merge requests
2021-09-30 23:02:18 +05:30
that are not drafts.
2023-07-09 08:55:56 +05:30
Any of the Analytics Instrumentation engineers can be assigned for the Analytics Instrumentation review.