diff options
Diffstat (limited to 'doc/development/prometheus_metrics.md')
-rw-r--r-- | doc/development/prometheus_metrics.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/development/prometheus_metrics.md b/doc/development/prometheus_metrics.md index df13cb7d56c..05a623448bf 100644 --- a/doc/development/prometheus_metrics.md +++ b/doc/development/prometheus_metrics.md @@ -4,7 +4,7 @@ group: Health info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments --- -# Working with Prometheus Metrics +# Working with Prometheus Metrics **(FREE)** ## Adding to the library @@ -75,5 +75,10 @@ This section describes how to add new metrics for self-monitoring 1. Select the appropriate name for your metric. Refer to the guidelines for [Prometheus metric names](https://prometheus.io/docs/practices/naming/#metric-names). 1. Update the list of [GitLab Prometheus metrics](../administration/monitoring/prometheus/gitlab_metrics.md). +1. Carefully choose what labels you want to add to your metric. Values with high cardinality, +like `project_path`, or `project_id` are strongly discouraged because they can affect our services +availability due to the fact that each set of labels is exposed as a new entry in the `/metrics` endpoint. +For example, a histogram with 10 buckets and a label with 100 values would generate 1000 +entries in the export endpoint. 1. Trigger the relevant page or code that records the new metric. 1. Check that the new metric appears at `/-/metrics`. |