Report summarized Gitaly Apdex via usage ping
What does this MR do?
- Adds a new prometheus backed apdex-like metric to the gitaly component section of the usage ping.
Testing (GDK)
Enable prometheus:
gdk.yml
:
prometheus:
enabled: true
Rejigger gdk:
gdk reconfigure
Turn on gitaly' prometheus metrics port and histogram latencies:
gitaly/gitaly-0.praefect.toml
:
# Optional: export metrics via Prometheus
prometheus_listen_addr = "127.0.0.1:9236"
[prometheus]
grpc_latency_buckets = [0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0]
Download and setup gitlab prometheus rules from omnibus:
curl https://gitlab.com/gitlab-org/omnibus-gitlab/-/raw/master/files/gitlab-cookbooks/monitoring/templates/rules/gitlab.rules?inline=false -o <GDK_ROOT>/prometheus/gitlab.rules
prometheus/prometheus.yml
:
rule_files:
- 'gitlab.rules'
Procfile
:
prometheus: exec docker run -p 9090:9090 -v <GDK_ROOT>/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml -v <GDK_ROOT>/prometheus/gitlab.rules:/etc/prometheus/gitlab.rules prom/prometheus:v2.25.0
Restart GDK:
gdk restart
Check that prometheus has detected our gitaly target as healthy in http://localhost:9090/targets
:
Make some git activity.
Goto Admin > Settings > Metrics and profiling. Expand Usage statistics. Preview payload:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by James Fargher