Skip to content

Disable Prometheus metrics in GraphQL generic tracer

What does this MR do and why?

This tracer creates high-cardinality metrics that do not appear to be used.

This introduces a graphql_generic_tracing_metrics_deactivate feature flag that will deactivate this if enabled.

Relates to #345396 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. On this branch, navigate to a project repository.
  2. Use curl to scrape the /-/metrics endpoint of your GDK. You should see hundreds of metrics. For example:
% curl -s https://host.docker.internal:3443/-/metrics | grep graphql_duration_seconds | wc -l
562
  1. On this branch, enable the feature flag: Run bin/rails console and Feature.enable(:graphql_generic_tracing_metrics_deactivate).
  2. Restart Puma: gdk restart rails
  3. Repeat steps 1 to 3. You should see 0 metrics.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading