fix: preserve log alert recovery events

This commit is contained in:
zxr
2026-07-21 21:21:47 +08:00
parent 0655afb5ab
commit eaca3d0ac8
3 changed files with 74 additions and 9 deletions

View File

@@ -108,7 +108,7 @@ func forwardAlert(body AlertReceiveBody) error {
}
func postAlertPayload(cfg *config.AlertForwardConf, path string, payload []byte, traceID string) (*alertForwardResponse, error) {
req, err := http.NewRequest(http.MethodPost, cfg.BaseURL+path, bytes.NewReader(payload))
req, err := http.NewRequest(http.MethodPost, strings.TrimRight(strings.TrimSpace(cfg.BaseURL), "/")+path, bytes.NewReader(payload))
if err != nil {
return nil, fmt.Errorf("创建 Alert 转发请求失败:%w", err)
}