feat(go): expose gateway connection close metrics
This commit is contained in:
@@ -409,6 +409,16 @@ vehicle_async_sink_queue_depth{sink}
|
||||
|
||||
这些指标是进入带帧率压测前的关键保护栏:如果 `queue_depth` 持续增长、`enqueue_total{status="timeout"}` 增长,或 `vehicle_async_sink_publish_duration_ms_histogram_bucket` 的 p99 持续上升,说明入口 publish 队列或下游 NATS/Kafka 写入已成为瓶颈。
|
||||
|
||||
### Gateway connection close reason
|
||||
|
||||
2026-07-03 已为 TCP gateway 增加连接关闭原因计数:
|
||||
|
||||
```text
|
||||
vehicle_gateway_connection_closes_total{protocol,reason}
|
||||
```
|
||||
|
||||
当前 `reason` 包括 `eof`、`read_timeout`、`read_error`、`extract_error`、`context_cancelled`、`max_connections`。10W 长连接和带帧率压测时,应重点关注 `read_error`、`extract_error`、`max_connections` 是否异常增长;`read_timeout` 需要结合协议上报周期和在线数判断。
|
||||
|
||||
### NATS fast writer stage histogram
|
||||
|
||||
2026-07-03 已为 NATS fast writer 增加阶段耗时 histogram:
|
||||
|
||||
Reference in New Issue
Block a user