feat(observability): add structured application logging
Emit correlated JSON logs from the API and FunASR services, propagate request IDs to the client, and configure bounded opt-in Docker logging. Document the host-wide Grafana/Loki query workflow and keep observability deployment ownership outside the application repository.
This commit is contained in:
@@ -242,3 +242,13 @@ Rust 健康检查应包含:
|
||||
- 尚未完成的验证或残余风险。
|
||||
|
||||
不得在报告中输出数据库密码、完整 `DATABASE_URL`、API 密钥或其他敏感信息。部署文件验证通过后保留改动供用户审查,不要自行提交或推送,除非用户在该会话中明确要求。
|
||||
|
||||
## 可观测性日志栈
|
||||
|
||||
业务服务通过 `compose.deploy.yml` 运行,并通过 `observability.logs=true` 标签接入宿主机中央
|
||||
观测栈。中央 Loki、Alloy 和 Grafana 由
|
||||
`/home/shay/data/docker-service/observability/compose.yml` 独立管理,不在本项目构建或启停。
|
||||
|
||||
本项目只负责结构化日志、脱敏、关联 ID、容器采集标签和日志轮转。查询和接入方法见
|
||||
`docs/observability-runbook.md`;中央栈的凭据、数据卷、备份和升级遵循其部署目录中的
|
||||
`README.md`。停止中央观测栈不得影响 API 或 FunASR。
|
||||
|
||||
Reference in New Issue
Block a user