[FE] Instance Statistics MVP: object counts
Overview
In &4147 (closed), we describe the need for an instance-level overview of instance activity.
backend issue: #233853 (closed)
Proposal
Introduce the Instance Statistics page in the admin panel.
- Show counts for users, projects, groups, issues, MRs, and pipelines. These counts should include the total number of these objects on the instance.
- Query and store these counts daily for performance. Show when the data was pulled.
Designs
- Show closed items
Is blocked by
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Martin Wortschack added to epic &4147 (closed)
added to epic &4147 (closed)
- Martin Wortschack added Next Up backend devopsmanage priority1 labels
added Next Up backend devopsmanage priority1 labels
- Martin Wortschack added groupoptimize workflowplanning breakdown labels
added groupoptimize workflowplanning breakdown labels
- Martin Wortschack removed backend label
removed backend label
- Martin Wortschack changed the description
Compare with previous version changed the description
- Martin Wortschack marked this issue as related to #233853 (closed)
marked this issue as related to #233853 (closed)
- Martin Wortschack mentioned in issue #233853 (closed)
mentioned in issue #233853 (closed)
- 🤖 GitLab Bot 🤖 added sectiondev label
added sectiondev label
- Martin Wortschack changed milestone to %13.4
changed milestone to %13.4
- Contributor
@wortschi: Thanks for moving this into the milestone. Please let @npost know if there are more details needed here, but I hope this is basically workflowready for development
Collapse replies - Author Maintainer
Will you expose the object count for as a REST or GraphQL API?
Also, do you think we can already agree on an API spec (request/response) so frontend can start working on this?
- Contributor
I believe this would be a new API, and GitLab practices "GraphQL preferred," so I'm expecting a GraphQL API.
@ahegyi if you agree could you draft an API spec?
- Maintainer
Query proposal:
instanceStatistics(last: 1) { mergeRequests { count recordedAt } users { count recordedAt } groups { count recordedAt } ...more objects }
This loads the latest counts for each object. Notice the
recordedAt
attribute is present for each object (since we'd count the object separately). This can be used to show the "last update" date (just take the latestrecordedAt
from the response).To support FE development, we can start with a dummy API that returns fake.
- Author Maintainer
Thanks for the proposal, that makes sense!
To support FE development, we can start with a dummy API that returns fake.
That would be great! Should we create a separate issue for this? WDYT?
- Maintainer
Sure, I can pick it up shortly: #241673 (closed)
- Author Maintainer
Perfect, thank you!
- Jeremy Watson (ex-GitLab) removed Next Up label
removed Next Up label
- Martin Wortschack assigned to @wortschi
assigned to @wortschi
- Martin Wortschack set weight to 2
set weight to 2
- Martin Wortschack added workflowready for development label and removed workflowplanning breakdown label
added workflowready for development label and removed workflowplanning breakdown label
- Dan Jensen added GitLab Core label
added GitLab Core label
- Author Maintainer
I wonder if we want to use a separate container for every metric (like shown in the issue description) or if we should rather use a common container for all metrics on that page like we have on the
Group Overview page
:WDYT?
Edited by Martin Wortschack Collapse replies
- Martin Wortschack added workflowin dev label and removed workflowready for development label
added workflowin dev label and removed workflowready for development label
- Martin Wortschack created merge request !41853 (merged) to address this issue
created merge request !41853 (merged) to address this issue
- Martin Wortschack mentioned in merge request !41853 (merged)
mentioned in merge request !41853 (merged)
- Dan Jensen mentioned in merge request !41939 (merged)
mentioned in merge request !41939 (merged)
- Contributor
Here is a draft documentation MR for Instance Statistics: !41939 (merged). We can finalize and merge as soon as this issue is resolved
- Martin Wortschack closed with merge request !41853 (merged)
closed with merge request !41853 (merged)
- Martin Wortschack mentioned in commit 42f26785
mentioned in commit 42f26785
- Dan Jensen mentioned in merge request !42888 (merged)
mentioned in merge request !42888 (merged)
- Developer
Looks like this is currently gated behind
:instance_statistics
feature flag. Would it be possible for someone to update docs accordingly per process: https://docs.gitlab.com/ee/development/documentation/feature_flags.html/cc @mjang1
Collapse replies @bbodenmiller : I think you're right, cc @djensen . I've created !46702 (merged) to add the feature flag limitations.
1
- Mike Jang mentioned in merge request !46702 (merged)
mentioned in merge request !46702 (merged)
- Dan Jensen mentioned in issue #281834 (closed)
mentioned in issue #281834 (closed)
- Suzanne Selhorn mentioned in merge request !82044 (merged)
mentioned in merge request !82044 (merged)
- Brandon Labuschagne added devopsmonitor label and removed devopsfoundations label
added devopsmonitor label and removed devopsfoundations label