Skip to main content
  • Deployment model: On-premises
Use your Prometheus deployment to scrape Qodo components and Grafana to display the results. The Qodo Helm chart can create ServiceMonitor resources for individual components. It does not install Prometheus, Prometheus Operator, or Grafana. This guide uses Prometheus Operator. For standalone Prometheus, configure scraping in your collector using the ports below; standalone Prometheus does not consume ServiceMonitor resources.

Before you begin

Prepare:
  • The Qodo chart and values files for your installation.
  • A running Prometheus Operator and the servicemonitors.monitoring.coreos.com CRD.
  • A running Prometheus instance configured to discover monitors in your Qodo namespace.
  • Permission to create ServiceMonitors, plus Prometheus discovery permissions for the namespace’s Services, Pods, and endpoints.
  • Network access from the collector to the selected metrics ports.
  • A Grafana instance that can query your Prometheus server.
You can use your existing monitoring stack. Keep collection and dashboards within your environment according to your monitoring policy. For more information, see Infrastructure requirements.

1. Check Prometheus discovery

The examples use namespace qodo and monitor label release: monitoring. Replace these with your namespace and the labels your Prometheus selects.
Check both selectors on the Prometheus resource: An omitted namespace selector discovers monitors only in the Prometheus resource’s own namespace. If Prometheus runs elsewhere, include Qodo’s namespace in its discovery scope. Preserve the namespaces and labels already used by your monitoring stack. The Operator must watch that namespace, and the Prometheus service account must be able to discover its targets. A monitor can exist without being selected or scraped. For more information, see Getting started with Prometheus Operator.

2. Choose the components to scrape

The examples collect these application endpoints at /metrics: The monitor’s port is a Service port name, not a number. The chart defaults to metrics; components exposing metrics on their ordinary HTTP listener need port: http. The code review worker’s separate health port serves probes. Use its http port for metrics. The values below add missing metrics Service ports and enable a Service for the knowledge consumer. Existing HTTP ports remain available. This example does not add database, Redis, RabbitMQ, or Kubernetes exporters. Manage those with your monitoring stack. Use cluster metrics for Pod restarts, CPU, memory, and volume usage across all workloads, including workloads without a metrics endpoint listed above.

3. Configure the Qodo Helm values

Save this as monitoring-values.yaml. Keep only the components you deploy and replace every release: monitoring label if your selector requires another.
monitoring-values.yaml
These ports stay inside the cluster. Keep your existing HTTP ports and permit only the required monitoring traffic through your network policies. The example does not require a public metrics Ingress. The prometheus.serviceMonitor settings create discovery resources. They do not start an exporter in an application that does not expose metrics. Preview with all your existing values layers:
Treat the rendered file as sensitive because it can contain Secrets. Check that each monitor references an existing named Service port and has labels matching your Prometheus selector. Apply the same files through your normal deployment process:
Use the chart release approved for your installation. Include the monitoring file on subsequent upgrades. For more information, see Deploy Qodo using Helm.

4. Verify collection in Prometheus

Check the monitors and Services:
To test the runtime exporter directly, forward its metrics port:
In another terminal:
Expect Prometheus exposition text with metric names and HELP or TYPE comments. This verifies one exporter; it does not establish that Prometheus can discover or reach it from the monitoring namespace. In your Prometheus UI, open the targets page and find the Qodo targets. Wait for at least two scrape intervals. Each expected endpoint should report UP. Query scrape health:
Each target should return 1. A value of 0 means the scrape failed. An absent target means discovery, filtering, or relabeling needs investigation. Check actual target labels if your collector rewrites or omits namespace, service, or pod. Trigger a test code review and a Context Engine request, then check their metric series. Some series appear only after the relevant operation occurs. Scrape health alone does not confirm a successful code review.

5. Display metrics in Grafana

  1. Go to Connections > Data sources and add or select a Prometheus data source.
  2. Set the server URL to the Prometheus query endpoint reachable from the Grafana server. Use the Prometheus server address, rather than an application’s /metrics URL.
  3. Configure authentication and TLS for your monitoring stack, then select Save & test.
  4. Open Explore, select the data source, and run up{namespace="qodo"}.
  5. Create a dashboard with panels using the queries below. Select a time range that includes your test traffic.
For more information, see Configure the Prometheus data source. Use state or stat panels for readiness, and time-series panels for rates and latency. Filter or group by the labels present in your installation for per-service or per-Pod views. Add alerts through your monitoring process after establishing normal behavior for your workload.

Troubleshoot missing metrics

Useful discovery checks:
For more information, see Troubleshooting Prometheus Operator.

Next steps