Skip to content

Commit f50deea

Browse files
committed
propagated the context from sarama consumer group session into the log log.WithContext()
1 parent ec2ddb4 commit f50deea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/accountingservice/kafka/consumer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (g *groupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim s
7474
return err
7575
}
7676

77-
g.log.WithContext(context.Background()).WithFields(logrus.Fields{
77+
g.log.WithContext(session.Context()).WithFields(logrus.Fields{
7878
"orderId": orderResult.OrderId,
7979
"messageTimestamp": message.Timestamp,
8080
"messageTopic": message.Topic,

0 commit comments

Comments
 (0)