Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1c69050d
Commit
1c69050d
authored
Feb 05, 2021
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Discourage the usage of labels with high cardinality
parent
a6a354d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
doc/development/prometheus_metrics.md
doc/development/prometheus_metrics.md
+5
-0
No files found.
doc/development/prometheus_metrics.md
View file @
1c69050d
...
@@ -75,5 +75,10 @@ This section describes how to add new metrics for self-monitoring
...
@@ -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
1.
Select the appropriate name for your metric. Refer to the guidelines
for
[
Prometheus metric names
](
https://prometheus.io/docs/practices/naming/#metric-names
)
.
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.
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.
Trigger the relevant page or code that records the new metric.
1.
Check that the new metric appears at
`/-/metrics`
.
1.
Check that the new metric appears at
`/-/metrics`
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment