feat(hub): 观测 counters 批2 — ws/delivery/offline/team-timeout/eventbus/admin(D 审计 G1/G2/G5/G6/G7/G10) - #1449
Conversation
…/admin(G1/G2/G5/G6/G7/G10) D 审计批2 6 条 S 级缺口,纯加观测(counter + Inc),不改业务控制流。 metrics.go 新增 6 组 counter/gauge(nil-guard 对齐 #1441/#1447): - G1: ws_delivery_failures_total{reason} CounterVec - G2: ws_disconnects_total / ws_reconnects_total / ws_stale_close_total - G5: agent_dispatch_offline_push_failures_total{route} CounterVec - G6: team_assignment_timeouts_total + team_assignment_state_transition_failures_total{phase} - G7: eventbus_submit_failures_total Counter - G10: admin_server_up Gauge
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
D 审计批2 — 6 条 S 级观测缺口
纯加观测(counter/gauge + Inc/Set),不改业务控制流、不改返回值、不改签名。对齐 #1441/#1447 nil-guard 模式。metrics.go 唯一归属。
6 条 metric
ws_delivery_failures_totalreason=marshal_error|conn_closed|conn_not_foundws/manager.goPushToConn — 4 return 前各 Incws_disconnects_total/ws_reconnects_total/ws_stale_close_totalws/manager.goUnregister / SetAuth(oldConnID) / pingAll stale closeagent_dispatch_offline_push_failures_totalroute=unbound_inviter_desktop|unbound_ws_miss|unbound_only|hub_relay|target_bound|redispatchagent_dispatch.go5 处 +agent_dispatch_target_bound.go1 处team_assignment_timeouts_total+team_assignment_state_transition_failures_totalphase=status_update|event_appendagent_team_routing.goFailTimedOutAssignmentseventbus_submit_failures_totaleventbus.goPublish pool.Submit 失败admin_server_upapp/admin.go— Set 1 成功启动 / Set 0 凭据缺失或 ListenAndServe 失败不碰
agent_team_routing.go不同行 :760,G6 在 :684-721)改了哪些文件
hub-server/internal/metrics/metrics.go— 6 组 var + construct + MustRegisterhub-server/internal/ws/manager.go— G1 (4 Inc) + G2 (3 Inc)hub-server/internal/service/agent_dispatch.go— G5 (5 routes) + import metricshub-server/internal/service/agent_dispatch_target_bound.go— G5 (1 route) + import metricshub-server/internal/service/agentteam/agent_team_routing.go— G6 (3 Inc)hub-server/internal/service/eventbus.go— G7 (1 Inc)hub-server/internal/app/admin.go— G10 (3 Set)测试
17 packages — all green。
gofmt -w ✓ | git diff --check ✓ | nil-guard 对齐 #1441/#1447 ✓
PROGRESS.md 未提交(untracked)。