4 Commits

Author SHA1 Message Date
lili
47644881ff feat(observability): Grafana 看板激活生成指标 + 三条阈值告警(阶段四·面五之上)
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
- observability-overview.json:业务指标占位 panel 改用面五真实指标名(gen_task_total{status=succeeded}
  / gen_duration_seconds / gen_queue_depth / gen_gate_fail_total,去掉猜错的 huijing_ 前缀与 success 标签)
  + 新增 llm_cost 成本 panel(单次均值/近1h累计,标自估值非 new-api 权威)。
- provisioning/alerting/gen-alerts.yaml:三阈值告警——生成成功率<80%(MVP门 §2)/ 队列深度>15(便宜档
  并发上限)/ game-cloud up=0(后端不可达),+ webhook contact point(飞书/钉钉,URL 待创始人填)+ 路由策略。

对着 MVP 门(成功率≥80% / 可用性≥99.5% / 便宜档并发≤15)。webhook URL 未填前告警在 Grafana UI 可见但不
外发,§7 验收#2「告警真送达」待真 webhook。compose 已挂 provisioning 全目录,重启 grafana 容器即生效。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 20:47:52 -07:00
lili
e21ab160e2 feat(obs): T2-5 Prometheus scrape game-cloud actuator(波② 端点已成立·dev target)
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
波② 已给 huijing-server 挂 actuator/micrometer、/actuator/prometheus 端点成立并 dev 亲验,
本波启用 prometheus.yml 里预留注释的 game-cloud job:target=dev huijing-dev(100.64.0.7:48080,
staging profile 已放行 /actuator/**、exposure 仅 health,prometheus)。nacos/rmq job 仍留注释
(各自 exporter 未就位、不越界)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 11:50:20 -07:00
lili
9c4638ee9d fix(观测): 阶段四第一波起容器四处排障修复(端口/expand-env/镜像)
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
起容器碰生产 mini-infra 暴露四坑,逐个修:
- 端口:9090 被 mini-infra 自身 mihomo/clash API 占(docker ps 看不到 host 网/宿主进程端口、摸底漏),Prometheus 让到 9091
- Loki+Tempo:配置注释里的 ${MINIO_*} 被 expand-env 连注释严格校验、通配符触发 "missing closing brace",改纯文字(先前误判 Tempo 宽松、其实同款)
- Collector 镜像:daocloud mirror 的 collector-contrib:0.116.0 缺 binary(exec no such file、force 重下同 digest 仍坏);0.114.0 的 redaction 缺 blocked_key_patterns/redact_all_types(脱敏红线);定版 0.155.0(binary 完好+redaction 字段最全)
五件全绿:Collector/Prometheus(9091)/Tempo/Loki/Grafana 全 200,实占约 170MiB(<< 3.4G 上限)。
follow-up:0.155 提示 otlphttp→otlp_http(deprecated warning、不阻塞)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 07:25:39 -07:00
lili
62ce5531b6 feat(观测): 阶段四第一波观测栈 compose(五件+脱敏+MinIO后端,不起容器)
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
deploy/infra/observability/:OTel Collector+Prometheus+Tempo+Loki+Grafana docker-compose,照已签设计施工(opus 写 + fable 源码级终审)。
- 端口逐个不撞现有(Grafana 3002 避 new-api 3000/gitea 3001;Collector 4317-4318/Prom 9090/Tempo 3200/Loki 3100)
- 资源三上限(mem 合计 3.4G / cpus / cpu_shares=512 CPU 争用让路 new-api)
- 脱敏 redaction 三 pipeline 导出前(手机号/token/JWT/密钥)= 安全红线
- Tempo/Loki 存 MinIO 独立桶 obs-tempo/obs-loki(minio-init 幂等建、不碰 ragflow)
- 镜像全钉版本、密钥全走 .env 不入仓
终审验通:git 纯新增未 commit / compose config exit=0 / infra-minio 在 infra-shared 网 DNS 可解析(最大风险排除)/ grafana:11.4.0 经 daocloud mirror 拉取成功。起容器待创始人 go(碰生产 mini-infra)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 05:28:52 -07:00