Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Nov 4, 2024
1 parent 16121aa commit efb953c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/kafkalib/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ func (b *BatchWriter) write(ctx context.Context, messages []KafkaMessage, sample
}

return batch.BySize[KafkaMessage](messages, int(b.writer.BatchBytes), encoder, func(chunk [][]byte) error {
tags := map[string]string{
"what": "error",
}

tags := map[string]string{"what": "error"}
defer func() {
if b.statsD != nil {
b.statsD.Count("kafka.publish", int64(len(chunk)), tags)
Expand Down

0 comments on commit efb953c

Please sign in to comment.