logger-http: Don't retry after a succesful send (#17266)

This commit is contained in:
Krishnan Parthasarathi 2023-05-22 14:53:18 -07:00 committed by GitHub
parent fc03be7891
commit 55a3310446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -283,6 +283,8 @@ func (h *Target) logEntry(ctx context.Context, entry interface{}) {
if err := h.send(ctx, logJSON, webhookCallTimeout); err != nil {
h.config.LogOnce(ctx, err, h.config.Endpoint)
atomic.AddInt64(&h.failedMessages, 1)
} else {
return
}
}
}