feat(observability): Actuator 健康端点 + 滚动日志 + base 日志降噪
总览 §10.2 可观测性:
- platform-app 加 spring-boot-starter-actuator,management 只暴露 health(开 liveness/readiness 探针,show-details when-authorized 不泄露 db 等组件细节);不上 Prometheus 全家桶
- SecurityConfig.PUBLIC_PATHS 加 /actuator/health(/**),prod 链探针免认证可达
- 新增 logback-spring.xml(控制台 + 50MB×14 天滚动文件,文件 appender 仅 dev/local/prod 启用,不污染单测)
- base application.yml 日志 com.dsasp/jdbc.core DEBUG→INFO(prod 继承 INFO,dev 仍 DEBUG);.gitignore 忽略 logs/
验证:真启动 dev profile(1.7s)curl /actuator/health=200 {UP,groups:[liveness,readiness]} + readiness/liveness 均 200 UP;SecurityProfileTest 3/3 + ArchitectureRulesTest 6/6 无回归。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -189,7 +189,7 @@ EIP3(Vaadin / 老引擎)→ EIP4(amis 前端 + 保真层 + 转换器)迁
|
||||
**【生产交付能力 — 意图与实现最大成体系缺口,对应 A10】**
|
||||
- **Flyway 平台表迁移未实现 · medium · L**:`架构设计.md:36` 承诺 Flyway,全仓零命中;SYS_* 建表散落 bootstrap/`*_upsert.sql`/CLI 内嵌(`bootstrap-ai-agent.sql` 两份易漂移)。→ 引入 Flyway 收敛为 `V{n}__*.sql` 单一真相。
|
||||
- **4 进程交付无 compose/Dockerfile/Nginx 配置 · medium · L**:`find docker-compose*` 零命中,切流/回滚仅停留文档。→ 补 `deploy/`(compose 四服务 + 健康检查 + `nginx.conf` 切流 upstream + `.env.example`)。
|
||||
- **可观测性近零 · medium · M**:pom 无 actuator/micrometer,无健康端点,无 `logback-spring.xml`。→ 加 actuator `/health`(liveness/readiness)+ prod JSON 结构化日志。
|
||||
- **✅【已完成 2026-06-24】可观测性近零**:原状=无 actuator/无健康端点/无 logback 配置/base 日志 DEBUG(prod 继承会刷屏)。**已做**:① platform-app 加 `spring-boot-starter-actuator`,`management` 只暴露 `health`(`probes.enabled` 开 liveness/readiness,`show-details/components: when-authorized` 匿名不泄露 db 等组件细节)——不上 Prometheus 全家桶,守中间件最小化;② `SecurityConfig.PUBLIC_PATHS` 加 `/actuator/health(/**)`,prod 链探针免认证可达;③ 新增 `logback-spring.xml`(控制台 + 50MB×14 天滚动文件,文件 appender 仅 dev/local/prod 启用、不污染单测);④ base `application.yml` 的 `com.dsasp`/`jdbc.core` 日志 DEBUG→INFO(prod 继承 INFO,dev 仍 DEBUG)。**验证**:真启动 dev profile(1.7s 起)curl `/actuator/health`=`200 {"status":"UP","groups":["liveness","readiness"]}`、`/health/readiness`=200 UP、`/health/liveness`=200 UP;SecurityProfileTest 3/3 + ArchitectureRulesTest 6/6 无回归。**残留**:prod JSON 结构化日志需 Spring Boot 3.4 内建或 logstash-encoder 依赖,留作后续(避免现在加依赖)。
|
||||
|
||||
**【验证体系】**
|
||||
- **逐行对拍框架已冻结 · high · M**:`parity-reports/` 全是 `20260611` 时间戳,对拍 main 末次提交 0611,11 天引擎/转换器改动从未重拍;`--discover`/`--realprivilege` 从不在 CI 跑。→ 接夜间 job + 基线锁定(本次 vs 上次 diff,非 0 即阻断)。
|
||||
|
||||
Reference in New Issue
Block a user