Prometheus 指标端点 (/api/v1/metrics): - presence_online_users_total: 实时在线人数 - presence_dau_total: 今日 DAU - presence_heartbeat_total: 心跳计数 - presence_events_received_total: 事件上报计数 - presence_session_start_total: 会话开始计数 - presence_heartbeat_duration_seconds: 心跳处理延迟 - presence_event_batch_duration_seconds: 事件批处理延迟 Grafana Dashboard: - 核心指标概览 (在线人数、DAU、心跳、事件) - 趋势图表 (在线人数趋势、心跳/事件速率) - 事件分布 (饼图、按小时趋势) - 性能指标 (P50/P95/P99 延迟) - 服务资源 (内存、CPU) 配置更新: - prometheus.yml 添加 presence-service 抓取配置 - package.json 添加 prom-client 依赖 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| backend | ||
| docs | ||
| frontend | ||
| kubernetes | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| README.md | ||
| docker-compose.yml | ||