Add performance analytics metrics api
What does this MR do and why?
Add performance analytics metrics api for group level and project level.
note: This MR is behind performance_analytics
feature flag, which is disabled by default.
related to #1884 (closed)
How to set up and validate locally
- In rails console enable feature flag
Feature.enable(:performance_analytics)
- fetch api through
curl
> # Daily > curl -H 'Private-token: XXX' "http://local.gitlab.test:3000/api/v4/groups/134/performance_analytics/metrics?metric=issue_created&start_date=2022-09-01&end_date=2022-09-02" [{"date":"2022-09-01","value":1},{"date":"2022-09-02","value":0}] > # Monthly > curl -H 'Private-token: XXX' "http://local.gitlab.test:3000/api/v4/groups/134/performance_analytics/metrics?metric=issue_created&start_date=2022-09-01&end_date=2022-10-30&interval=monthly" [{"date":"2022-09","value":1},{"date":"2022-10","value":0}] > # All > curl -H 'Private-token: XXX' "http://local.gitlab.test:3000/api/v4/groups/134/performance_analytics/metrics?metric=issue_created&start_date=2022-09-01&end_date=2022-10-30&interval=all" {"value":1}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 Linjie Zhang 编辑于