Add a query to count rows in the registry namespaces table
Related to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14127.
Expands on https://gitlab.com/gitlab-org/gitlab-exporter/-/merge_requests/151 by adding another query to monitor the size of the top_level_namespaces
table in the container registry database.
Additionally, this MR adds a comment to make it clear that repositories
, manifests
, and blobs
tables are partitioned and as such the SELECT COUNT(*)
behind these queries is expected to scale poorly and should be avoided in production.
I have a pending followup MR for chef: https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/669.
Related to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14304.
Edited by João Pereira