Skip to content

feat(docker): add Prometheus + Grafana monitoring compose overlay#3436

Open
amir-deris wants to merge 6 commits into
mainfrom
amir/plt-334-local-grafana-prometheus-docker-compose-setup
Open

feat(docker): add Prometheus + Grafana monitoring compose overlay#3436
amir-deris wants to merge 6 commits into
mainfrom
amir/plt-334-local-grafana-prometheus-docker-compose-setup

Conversation

@amir-deris
Copy link
Copy Markdown
Contributor

@amir-deris amir-deris commented May 14, 2026

Summary

  • Adds docker/docker-compose.monitoring.yaml — a compose overlay that attaches Prometheus and Grafana to the existing localnet network alongside the 4-node local cluster
  • Adds docker/docker_compose_monitoring/prometheus.yaml — scrape config targeting all four nodes (sei-node-{0-3}:1317) at 5 s intervals
  • Adds docker/docker_compose_monitoring/grafana-datasource.yaml — auto-provisions Prometheus as the default Grafana datasource on startup
  • Adds make docker-cluster-start-monitoring / make docker-cluster-stop-monitoring Makefile targets and updates docker/README.md to document the combined workflow alongside the existing script-based alternative

Note

Low Risk
Low risk: adds optional local Docker Compose monitoring services and make targets without changing chain/runtime logic or production configuration.

Overview
Adds a docker-compose.monitoring.yml overlay that runs Prometheus and Grafana on the existing localnet network, including a Prometheus scrape config for all four local nodes and a provisioned Grafana Prometheus datasource.

Introduces make docker-cluster-start-monitoring / make docker-cluster-stop-monitoring to bring the cluster + monitoring stack up/down in one command, and updates docker/README.md to document the combined workflow alongside the existing script-based approach.

Reviewed by Cursor Bugbot for commit a314fb0. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 15, 2026, 8:02 PM

@amir-deris amir-deris changed the title Added new docker compose stack for monitoring feat(docker): add Prometheus + Grafana monitoring compose overlay May 14, 2026
Comment thread Makefile
@amir-deris amir-deris requested review from bdchatham and masih May 14, 2026 17:03
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.31%. Comparing base (823a78d) to head (c924ea1).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3436      +/-   ##
==========================================
+ Coverage   59.29%   59.31%   +0.02%     
==========================================
  Files        2125     2118       -7     
  Lines      175629   174715     -914     
==========================================
- Hits       104144   103639     -505     
+ Misses      62404    62039     -365     
+ Partials     9081     9037      -44     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 138 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 15, 2026

PR Summary

Low Risk
Low risk: changes are limited to local Docker compose/Makefile workflows and documentation, with no impact on chain runtime or production deployments unless developers opt into the new targets.

Overview
Adds a docker-compose.monitoring.yml overlay that brings up Prometheus and Grafana on the existing localnet network, with Prometheus scraping sei-node-{0..3}:26660 and Grafana auto-provisioned to use it as the default datasource.

Introduces make docker-cluster-start-monitoring / make docker-cluster-stop-monitoring to start/tear down the cluster plus monitoring stack in one command, and updates docker/README.md to document the combined flow alongside the existing script-based approach.

Reviewed by Cursor Bugbot for commit c924ea1. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread docker/docker_compose_monitoring/prometheus.yaml Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f70ad0. Configure here.

Comment thread Makefile
else \
DETACH_FLAG=""; \
fi; \
DOCKER_PLATFORM=$(DOCKER_PLATFORM) USERID=$(shell id -u) GROUPID=$(shell id -g) GOCACHE=$(shell go env GOCACHE) NUM_ACCOUNTS=10 INVARIANT_CHECK_INTERVAL=${INVARIANT_CHECK_INTERVAL} UPGRADE_VERSION_LIST=${UPGRADE_VERSION_LIST} MOCK_BALANCES=${MOCK_BALANCES} GIGA_EXECUTOR=${GIGA_EXECUTOR} GIGA_OCC=${GIGA_OCC} RECEIPT_BACKEND=${RECEIPT_BACKEND} AUTOBAHN=${AUTOBAHN} GIGA_STORAGE=${GIGA_STORAGE} docker compose -f docker-compose.yml -f docker-compose.monitoring.yml up --no-attach grafana --no-attach prometheus $$DETACH_FLAG
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring target duplicates entire cluster-start recipe body

Low Severity

The docker-cluster-start-monitoring target copy-pastes the entire body of docker-cluster-start — cleanup steps, directory creation, detach-flag logic, and a long inline list of ~10 environment variables (INVARIANT_CHECK_INTERVAL, GIGA_EXECUTOR, AUTOBAHN, etc.). The only difference is the compose file arguments and --no-attach flags. When a new feature-flag env var is added to docker-cluster-start, it can easily be forgotten in the monitoring target, causing silent behavioral differences between the two cluster modes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f70ad0. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants