Update Prometheus queries to use Liquid syntax for variable substitution

Once support for usage of Liquid in Prometheus queries is merged (!20793 (merged)), support for interpolating variables in Prometheus queries using the Ruby syntax (string_%{variable}_string) is planned to be deprecated and eventually discontinued: #37990 (closed)

Update documentation, predefined dashboards and code to use the Liquid syntax (string_{{variable}}_string) for interpolating variables.

Docs:

  1. doc/development/prometheus_metrics.md
  2. doc/user/project/integrations/prometheus_library/kubernetes.md
  3. doc/user/project/integrations/prometheus_library/nginx_ingress_vts.md
  4. doc/user/project/integrations/prometheus_library/nginx_ingress.md
  5. doc/user/project/integrations/prometheus.md
  6. doc/user/project/integrations/prometheus_library/cloudwatch.md
  7. doc/user/project/integrations/prometheus_library/haproxy.md
  8. doc/user/project/integrations/prometheus_library/nginx.md

Predefined dashboards:

  1. config/prometheus/cluster_metrics.yml
  2. ee/config/prometheus/cluster_metrics.yml
  3. config/prometheus/common_metrics.yml

Spec files:

  1. spec/lib/gitlab/prometheus/queries/knative_invocation_query_spec.rb
  2. spec/javascripts/monitoring/utils_spec.js
  3. spec/frontend/serverless/mock_data.js
  4. spec/frontend/monitoring/mock_data.js
  5. ee/spec/services/clusters/applications/prometheus_config_service_spec.rb
  6. spec/controllers/projects/environments/prometheus_api_controller_spec.rb

Note that the specs in spec/services/prometheus/proxy_variable_substitution_service_spec.rb need to stay. They will be removed when support for Ruby variable interpolation is removed.

Edited Jul 03, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading