Skip to content

Update Grafana dashboard path and Prometheus targets for observability - #3346

Merged
CrowleyRajapakse merged 1 commit into
wso2:mainfrom
Dimagidhp:fix/gateway-observability-config
Sep 1, 2026
Merged

CrowleyRajapakse merged 1 commit into
wso2:mainfrom
Dimagidhp:fix/gateway-observability-config

Conversation

@Dimagidhp

Copy link
Copy Markdown
Contributor

Purpose

Prometheus scrapes policy-engine and router, which no longer exist as services. They were merged into gateway-runtime. Policy Engine and Router metrics are never collected, and the dashboards silently stay empty. Also fixes the issue Grafana's home dashboard pointed at a directory containing no dashboards, so it opened on a blank page.

Resolves #3343

Goals

Restore Policy Engine and Router metrics, and make Grafana open on the Infrastructure Overview dashboard.

Approach

  • Point the policy-engine and router scrape jobs at gateway-runtime. Job names unchanged, so existing dashboards and alerts are unaffected.
  • Point GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH at /etc/grafana/dashboards/, where the dashboards are mounted.

5 lines across 4 files.

Documentation

N/A — corrections to existing internal values, no documented behaviour changes.

Automation tests

N/A — configuration-only change. Verified manually: Prometheus reports the corrected scrape URLs, and Grafana's home dashboard path now resolves to an existing file.

Security checks

Test environment

macOS (Apple Silicon), Rancher Desktop, Docker Compose v2.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: d3966717-8915-4cd6-b613-4f29bced2697

📥 Commits

Reviewing files that changed from the base of the PR and between d7474cc and db0637f.

📒 Files selected for processing (4)
  • gateway/distribution/docker-compose.yaml
  • gateway/docker-compose-perf.yaml
  • gateway/docker-compose.yaml
  • gateway/observability/prometheus/prometheus.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The gateway observability configuration now loads Grafana’s home dashboard from the mounted dashboards directory and scrapes Policy Engine and Router metrics from the gateway-runtime container.

Changes

Gateway observability

Layer / File(s) Summary
Align Grafana dashboard paths
gateway/distribution/docker-compose.yaml, gateway/docker-compose-perf.yaml, gateway/docker-compose.yaml
Grafana now uses /etc/grafana/dashboards/infrastructure-overview.json as the default home dashboard path.
Update Prometheus runtime targets
gateway/observability/prometheus/prometheus.yml
Prometheus now scrapes Policy Engine on gateway-runtime:9003 and Router on gateway-runtime:9901. Existing job names remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to db063

This change restores observability targets and points Grafana to the mounted dashboards directory; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: anugayan, arshardh, ashera96

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The Grafana default home dashboard path changes are not covered by linked issue #3343, which only requires correcting Policy Engine and Router Prometheus targets. Link a separate issue that requires the Grafana home dashboard correction, or remove the Grafana path changes from this pull request.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both primary changes: the Grafana dashboard path update and the Prometheus target updates.
Description check ✅ Passed The description covers the purpose, goals, approach, documentation, testing, security checks, and test environment. It omits User stories, Samples, and Related PRs, and it describes the Grafana path a…
Linked Issues check ✅ Passed The PR satisfies issue #3343 by redirecting the policy-engine and router scrape jobs to gateway-runtime, preserving job names, and applying the configuration across local, performance, and packaged di…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Description check

Explanation

The description covers the purpose, goals, approach, documentation, testing, security checks, and test environment. It omits User stories, Samples, and Related PRs, and it describes the Grafana path as a directory although the implementation uses a specific JSON file.

Full details: Linked Issues check

Explanation

The PR satisfies issue #3343 by redirecting the policy-engine and router scrape jobs to gateway-runtime, preserving job names, and applying the configuration across local, performance, and packaged distribution setups.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@CrowleyRajapakse
CrowleyRajapakse merged commit 23fb3f9 into wso2:main Sep 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Policy Engine and Router dashboards remain empty when the metrics profile is enabled

3 participants