Skip to content

Commit

Permalink
make logging consistent with other logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed Feb 25, 2021
1 parent fd2a27b commit d126ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/dynatraceexporter/metrics_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ var lastLog int64 = 0
// An error indicates all lines were dropped regardless of the returned number.
func (e *exporter) send(ctx context.Context, lines []string) (int, error) {
if now := time.Now().Unix(); len(lines) > maxChunkSize && now-lastLog > 60 {
e.logger.Sugar().Warnf("Batch too large. Sending in chunks of %[1]s metrics. If any chunk fails, previous chunks in the batch could be retried by the batch processor. Please set send_batch_max_size to %[1]s or less. Suppressing this log for 60 seconds.", maxChunkSize)
e.logger.Warn(fmt.Sprintf("Batch too large. Sending in chunks of %[1]d metrics. If any chunk fails, previous chunks in the batch could be retried by the batch processor. Please set send_batch_max_size to %[1]d or less. Suppressing this log for 60 seconds.", maxChunkSize))
lastLog = time.Now().Unix()
}

Expand Down

0 comments on commit d126ce0

Please sign in to comment.