Unicorn queue metric labels are too generic
Summary
The Unicorn Prometheus metrics for unicorn_queued_connections
, unicorn_active_connections
contain labels called "address" and "type". These are too generic, and tend to have conflicts when ingesting.
Steps to reproduce
Gitlab.com uses type
labels to denote what sub-service a Unicorn instance is a member of. IE web, api, sidekiq.
What is the current bug behavior?
When ingesting, some metrics get labeled with the type
label coming from Unicorn, instead of the label from discovery.
What is the expected correct behavior?
No conflict.
Relevant logs and/or screenshots
These two should have the same type
label:
unicorn_active_connections{address="/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket",environment="gprd",fqdn="api-01-sv-gprd.c.gitlab-production.internal",instance="api-01-sv-gprd.c.gitlab-production.internal:8080",job="gitlab-unicorn",stage="main",tier="sv",type="unix"}
gitlab_rails_queue_duration_seconds_bucket{environment="gprd",fqdn="api-01-sv-gprd.c.gitlab-production.internal",instance="api-01-sv-gprd.c.gitlab-production.internal:8080",job="gitlab-unicorn",le="+Inf",stage="main",tier="sv",type="api"}
Results of GitLab environment info
Affects GitLab <= 11.7