Skip to content
代码片段 群组 项目
提交 327bd786 编辑于 作者: Lorena Ciutacu's avatar Lorena Ciutacu
浏览文件

Merge branch 'michold-update-inst-docs' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -21,7 +21,6 @@ To implement a new metric in Service Ping, follow these steps: ...@@ -21,7 +21,6 @@ To implement a new metric in Service Ping, follow these steps:
1. [Generate the SQL query](#generate-the-sql-query) 1. [Generate the SQL query](#generate-the-sql-query)
1. [Optimize queries with Database Lab](#optimize-queries-with-database-lab) 1. [Optimize queries with Database Lab](#optimize-queries-with-database-lab)
1. [Add the metric definition to the Metrics Dictionary](#add-the-metric-definition) 1. [Add the metric definition to the Metrics Dictionary](#add-the-metric-definition)
1. [Add the metric to the Versions Application](#add-the-metric-to-the-versions-application)
1. [Create a merge request](#create-a-merge-request) 1. [Create a merge request](#create-a-merge-request)
1. [Verify your metric](#verify-your-metric) 1. [Verify your metric](#verify-your-metric)
1. [Set up and test Service Ping locally](#set-up-and-test-service-ping-locally) 1. [Set up and test Service Ping locally](#set-up-and-test-service-ping-locally)
...@@ -678,10 +677,6 @@ For more details, see the [database review guide](../../database_review.md#prepa ...@@ -678,10 +677,6 @@ For more details, see the [database review guide](../../database_review.md#prepa
See the [Metrics Dictionary guide](metrics_dictionary.md) for more information. See the [Metrics Dictionary guide](metrics_dictionary.md) for more information.
## Add the metric to the Versions Application
Check if the new metric must be added to the Versions Application. See the `usage_data` [schema](https://gitlab.com/gitlab-org/gitlab-services/version.gitlab.com/-/blob/main/db/schema.rb#L152) and Service Data [parameters accepted](https://gitlab.com/gitlab-org/gitlab-services/version.gitlab.com/-/blob/main/app/services/usage_ping.rb). Any metrics added under the `counts` key are saved in the `stats` column.
## Create a merge request ## Create a merge request
Create a merge request for the new Service Ping metric, and do the following: Create a merge request for the new Service Ping metric, and do the following:
......
...@@ -51,7 +51,7 @@ are regular backend changes. ...@@ -51,7 +51,7 @@ are regular backend changes.
#### The Analytics Instrumentation **reviewer** should #### The Analytics Instrumentation **reviewer** should
- Perform a first-pass review on the merge request and suggest improvements to the author. - Perform a first-pass review on the merge request and suggest improvements to the author.
- Check the [metrics location](metrics_dictionary.md#metric-key_path) in - Check the [metric's location](metrics_dictionary.md#metric-key_path) in
the Service Ping JSON payload. the Service Ping JSON payload.
- Add the `~database` label and ask for a [database review](../../database_review.md) for - Add the `~database` label and ask for a [database review](../../database_review.md) for
metrics that are based on Database. metrics that are based on Database.
...@@ -66,6 +66,7 @@ are regular backend changes. ...@@ -66,6 +66,7 @@ are regular backend changes.
- Check the file location. Consider the time frame, and if the file should be under `ee`. - Check the file location. Consider the time frame, and if the file should be under `ee`.
- Check the tiers. - Check the tiers.
- 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. - 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.
- Make sure that the new metric is available in Service Ping payload, by running: `Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values).dig(*'key_path'.split('.'))` with `key_path` substituted by the new metric's key_path.
- Metrics instrumentations - Metrics instrumentations
- Recommend using metrics instrumentation for new metrics, [if possible](metrics_instrumentation.md#support-for-instrumentation-classes). - Recommend using metrics instrumentation for new metrics, [if possible](metrics_instrumentation.md#support-for-instrumentation-classes).
- Approve the MR, and relabel the MR with `~"analytics instrumentation::approved"`. - Approve the MR, and relabel the MR with `~"analytics instrumentation::approved"`.
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册