Unable to remove empty/dead default metric groups

Summary

The huge collection of default metrics are forced upon users even when they are empty/unused and/or not applicable at all (Nginx for a C++ project, AWS for a project containing only .md files, ...)

Steps to reproduce

Set up a new self hosted GitLab instance, activated the Metrics subsystem and supply a custom, external Prometheus server (I am not sure whether the problem only shows up using those steps or if the problem always occurs)

Example Project

Not applicable, as it happens in self hosted instance. Our instance is running 13.0.6. Our instance can not be accessed publicly.

What is the current bug behavior?

When I activate Prometheus support for a project, my Operations/Metrics default dashboard is bogged down with tons of empty groups that don't make sense for the project. Our own custom metrics are pushed all the way down:

metrics

All these groups are empty:

metrics2

What is the expected correct behavior?

Empty groups for technologies that aren't in use should not be forced into the default metrics' prime real estate, pushing actual metrics off the page.

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.6.5p114
Gem Version:    3.0.3
Bundler Version:1.17.3
Rake Version:   12.3.3
Redis Version:  4.0.9
Git Version:    2.27.0
Sidekiq Version:5.2.7
Go Version:     unknown

GitLab information
Version:        13.0.6
Revision:       5aa982e01ea
Directory:      /home/git/gitlab
DB Adapter:     PostgreSQL
DB Version:     11.8
URL:            http://:10080
HTTP Clone URL: http://:10080/some-group/some-project.git
SSH Clone URL:  ssh://git@:10022/some-group/some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        13.2.0
Repository storage paths:
- default:      /home/git/data/repositories
GitLab Shell path:              /home/git/gitlab-shell
Git:            /usr/bin/git

Results of GitLab application Check

Note: I can't migrate all our projects right now, but I am very certain that the comment about the hashed storage is not related to the bug I am reporting.

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 13.2.0 ? ... OK (13.2.0) Running /home/git/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... yes Init script up-to-date? ... yes Projects have namespace: ... 4/1 ... yes 13/2 ... yes 9/4 ... yes 13/7 ... yes 18/8 ... yes 18/11 ... yes 4/14 ... yes 9/15 ... yes 4/16 ... yes 9/17 ... yes 20/21 ... yes 3/22 ... yes 4/23 ... yes 4/24 ... yes 9/27 ... yes 20/31 ... yes 22/33 ... yes 23/34 ... yes 23/35 ... yes 13/36 ... yes 20/37 ... yes 22/38 ... yes 20/39 ... yes 24/40 ... yes 4/41 ... yes 4/42 ... yes 9/43 ... yes 9/44 ... yes 9/45 ... yes 9/46 ... yes 20/47 ... yes 20/48 ... yes 20/49 ... yes 20/50 ... yes 20/51 ... yes 20/52 ... yes 13/53 ... yes 13/54 ... yes 22/55 ... yes 25/57 ... yes 22/59 ... yes 13/60 ... yes 13/61 ... yes 13/62 ... yes 13/63 ... yes 13/64 ... yes 13/65 ... yes 25/66 ... yes 13/67 ... yes 24/68 ... yes 22/69 ... yes 22/70 ... yes 24/71 ... yes 20/72 ... yes 22/73 ... yes 24/74 ... yes 26/75 ... yes 26/76 ... yes 28/77 ... yes 28/78 ... yes 28/79 ... yes 28/80 ... yes 28/81 ... yes 28/82 ... yes 28/83 ... yes 28/84 ... yes 28/85 ... yes 28/86 ... yes 28/87 ... yes 28/88 ... yes 26/89 ... yes 27/90 ... yes 27/91 ... yes 27/92 ... yes 27/93 ... yes 27/94 ... yes 27/95 ... yes 27/96 ... yes 27/97 ... yes 27/98 ... yes 27/99 ... yes 27/100 ... yes 27/101 ... yes 27/102 ... yes 27/103 ... yes 20/104 ... yes 27/105 ... yes 27/106 ... yes 27/107 ... yes 1/108 ... yes 24/109 ... yes 13/110 ... yes 20/111 ... yes 20/112 ... yes 32/118 ... yes 32/120 ... yes 30/121 ... yes 22/123 ... yes 22/124 ... yes 22/129 ... yes 20/130 ... yes 18/132 ... yes 28/133 ... yes 22/134 ... yes 9/138 ... yes 9/139 ... yes 18/141 ... yes 18/142 ... yes 18/143 ... yes 13/147 ... yes 36/150 ... yes 37/151 ... yes 37/152 ... yes 4/153 ... yes 20/154 ... yes 9/156 ... yes 4/158 ... yes 20/159 ... yes 2/160 ... yes 2/161 ... yes 18/162 ... yes 4/163 ... yes 2/164 ... yes 2/165 ... yes 9/166 ... yes 26/167 ... yes 28/168 ... yes 28/169 ... yes 22/170 ... yes 25/171 ... yes 2/174 ... yes 2/175 ... yes 2/177 ... yes 4/178 ... yes 9/179 ... yes 4/180 ... yes 42/182 ... yes 2/183 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.27.0) Git user has default SSH configuration? ... yes Active users: ... 12 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... no Try fixing it: Please migrate all projects to hashed storage as legacy storage is deprecated in 13.0 and support will be removed in 14.0. For more information see: doc/administration/repository_storage_types.md

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Assignee Loading
Time tracking Loading