Skip to content

Limit the initialized metrics by service

Bob Van Landuyt requested to merge bvl-limit-metric-init-by-service into master

This allows setting a GITLAB_METRICS_INITIALIZE env variable.

For GitLab.com, HAProxy directs a certain amoint of traffic to a certain fleet:

  • api: Handles most grape endpoints
  • web: Handles rails controllers
  • git: Handles traffic to specific git- related endpoints

When setting the variable to git, we'll only initialize metrics for a specific set of endpoints. That set of endpoints is gathered from the traffic that we currently see on the git-fleet of GitLab.com.

Setting the variable to web will only initialize metrics for Rails controllers.

Setting it to api will only initialize metrics for Grape endpoints.

Setting it to anything else will not initialize any metrics.

The default behaviour remains the same: initializing all metrics.

For: gitlab-com/gl-infra/scalability#1266 (closed)

Edited by Bob Van Landuyt

Merge request reports