fix(observability): 治理SSE慢请求虚报、客户端取消日志污染、退款重试刷屏与会话计数慢查询

This commit is contained in:
yml2213
2026-09-10 20:02:54 +08:00
parent ee0e70ccad
commit 784ffb5f72
7 changed files with 24 additions and 8 deletions
@@ -1,6 +1,7 @@
package chat
import (
"context"
"errors"
"net/http"
@@ -10,6 +11,9 @@ import (
)
func writeChatError(c *gin.Context, err error) {
if errors.Is(err, context.Canceled) || errors.Is(c.Request.Context().Err(), context.Canceled) {
return
}
response.RecordError(c, err)
switch {
case errors.Is(err, ErrDependencyUnavailable):