This commit is contained in:
wangchuxiao
2023-03-09 16:36:47 +08:00
parent 6f3320ab55
commit 7f861fa5c3
9 changed files with 31 additions and 29 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ func NewMConsumerGroup(consumerConfig *MConsumerGroupConfig, topics, addrs []str
}
}
func (mc *MConsumerGroup) GetContextFromMsg(cMsg *sarama.ConsumerMessage) context.Context {
ctx := context.Background()
func (mc *MConsumerGroup) GetContextFromMsg(cMsg *sarama.ConsumerMessage, rootFuncName string) context.Context {
ctx := tracelog.NewCtx(rootFuncName, "")
var operationID string
for _, v := range cMsg.Headers {
if string(v.Key) == constant.OperationID {