Skip to content

Report summarized Gitaly Apdex via usage ping

James Fargher requested to merge gitaly_usage_data_apdex into master

What does this MR do?

#216683 (closed)

  • 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: Screen_Shot_2021-03-18_at_1.08.38_PM

Make some git activity.

Goto Admin > Settings > Metrics and profiling. Expand Usage statistics. Preview payload:

Screen_Shot_2021-03-18_at_1.37.19_PM

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Merge request reports