Skip to content

Commit

Permalink
fix collector panic due to sarama sdk
Browse files Browse the repository at this point in the history
Signed-off-by: luhualin <[email protected]>
  • Loading branch information
Betula-L committed Nov 26, 2020
1 parent b8ccf73 commit 0642a85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/storage/kafka/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func NewSpanWriter(
}()
go func() {
for e := range producer.Errors() {
logger.Error(e.Err.Error())
if e != nil && e.Err != nil {
logger.Error(e.Err.Error())
}
writeMetrics.SpansWrittenFailure.Inc(1)
}
}()
Expand Down

0 comments on commit 0642a85

Please sign in to comment.