This repository was archived by the owner on Jun 2, 2026. It is now read-only.
feat: add Prometheus and Grafana monitoring stack#58
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
監控項目 Service Health 目的:先確認系統主要元件是否還活著。這是故障排查第一步。 API Traffic 目的:觀察使用者流量、API 是否變慢、是否出現 server error。這些最直接反映使用者體驗。 Backend Runtime 目的:確認 Spring Boot backend 本身是否有資源壓力,例如 memory 過高、CPU 過高、DB connection pool 快被用滿。 Database 目的:觀察 DB 是否可用、連線數是否異常、交易是否正常進行。DB 是系統核心依賴,壞掉會直接影響大部分 API。 Container And Proxy 目的:觀察 Docker container 層的資源使用,以及 reverse proxy 是否有連線壓力。這可以幫助判斷問題是在 app、DB、container resource,還是 gateway/proxy 層。 報告說法 |
5000user5000
commented
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a production-like observability stack for the local Docker Compose environment.
This introduces Spring Boot Actuator and Prometheus metrics for the backend, plus Prometheus, Grafana, PostgreSQL exporter, cAdvisor, and Nginx exporter in
deploy/production-like.Changes
Validation
cd backend && mvn clean verifycd frontend && npm run test:coveragedocker-compose -f deploy/production-like/compose.yml up -d --build --scale backend=2UP:cloud-native-backendcloud-native-postgrescloud-native-containerscloud-native-nginx