Skip to content

Commit

Permalink
调整:事件订阅不再关联上级AppName
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed May 6, 2024
1 parent d042e20 commit 179dd1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions traceManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,10 @@ func (*traceManager) EntryQueueConsumer(queueName, subscribeName string) trace.I
func (receiver *traceManager) EntryEventConsumer(server, eventName, subscribeName string) trace.ITraceContext {
// 事件消费,一般是由其它入口的程序触发的,所以这里先看能不能取到之前的上下文
var traceId string
var parentAppName string
var traceLevel int

if cur := receiver.GetCurTrace(); cur != nil {
traceId = cur.GetTraceId()
parentAppName = core.AppName
traceLevel = cur.GetTraceLevel() + 1
} else {
traceId = parse.ToString(sonyflake.GenerateId())
Expand All @@ -114,7 +112,7 @@ func (receiver *traceManager) EntryEventConsumer(server, eventName, subscribeNam
AppId: parse.ToString(core.AppId),
AppName: core.AppName,
AppIp: core.AppIp,
ParentAppName: parentAppName,
ParentAppName: "",
TraceId: traceId,
StartTs: time.Now().UnixMicro(),
TraceType: eumTraceType.EventConsumer,
Expand Down

0 comments on commit 179dd1c

Please sign in to comment.