Skip to content

Commit

Permalink
propagated the context from sarama consumer group session into the lo…
Browse files Browse the repository at this point in the history
…g log.WithContext()
  • Loading branch information
Kimbohlovette committed Mar 23, 2024
1 parent ec2ddb4 commit f50deea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accountingservice/kafka/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (g *groupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim s
return err
}

g.log.WithContext(context.Background()).WithFields(logrus.Fields{
g.log.WithContext(session.Context()).WithFields(logrus.Fields{
"orderId": orderResult.OrderId,
"messageTimestamp": message.Timestamp,
"messageTopic": message.Topic,
Expand Down

0 comments on commit f50deea

Please sign in to comment.