Skip to content
代码片段 群组 项目
提交 e659365a 编辑于 作者: Russell Dickenson's avatar Russell Dickenson
浏览文件

Merge branch 'aa-exporting-usage-ping-definitions' into 'master'

Doc for exporting usage ping definitions

See merge request gitlab-org/gitlab!42457
No related branches found
No related tags found
加载中
...@@ -850,3 +850,24 @@ The following is example content of the Usage Ping payload. ...@@ -850,3 +850,24 @@ The following is example content of the Usage Ping payload.
} }
} }
``` ```
## Exporting Usage Ping SQL queries and definitions
Two Rake tasks exist to export Usage Ping definitions.
- The Rake tasks export the raw SQL queries for `count`, `distinct_count`, `sum`.
- The Rake tasks export the Redis counter class or the line of the Redis block for `redis_usage_data`.
- The Rake tasks calculate the `alt_usage_data` metrics.
In the home directory of your local GitLab installation run the following Rake tasks for the YAML and JSON versions respectively:
```shell
# for YAML export
bin/rake gitlab:usage_data:dump_sql_in_yaml
# for JSON export
bin/rake gitlab:usage_data:dump_sql_in_json
# You may pipe the output into a file
bin/rake gitlab:usage_data:dump_sql_in_yaml > ~/Desktop/usage-metrics-2020-09-02.yaml
```
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册