Skip to content

Commit

Permalink
Make log destination error debug for serverless and warn for non serv…
Browse files Browse the repository at this point in the history
…erless (#24161)
  • Loading branch information
gh123man committed Apr 1, 2024
1 parent 2935c3e commit 933505f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/logs/client/http/destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,13 @@ func (d *Destination) sendAndRetry(payload *message.Payload, output chan *messag
if err != nil {
metrics.DestinationErrors.Add(1)
metrics.TlmDestinationErrors.Inc()
log.Warnf("Could not send payload: %v", err)

// shouldRetry is false for serverless. This log line is too verbose for serverless so make it debug only.
if d.shouldRetry {
log.Warnf("Could not send payload: %v", err)
} else {
log.Debugf("Could not send payload: %v", err)
}
}

if err == context.Canceled {
Expand Down

0 comments on commit 933505f

Please sign in to comment.