Skip to content

Commit

Permalink
添加明细的应用信息
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Dec 31, 2023
1 parent 2e24143 commit 3d62e4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions traceManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func add(traceDetail trace.ITraceDetail) {
} else {
detail.UnTraceTs = time.Duration(detail.StartTs-t.GetStartTs()) * time.Microsecond
}
detail.TraceId, detail.AppName, detail.AppId, detail.AppIp, detail.ParentAppName = t.GetAppInfo()
t.AddDetail(traceDetail)
}
}
4 changes: 4 additions & 0 deletions trackContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,7 @@ func (receiver *TraceContext) Error(err error) {
receiver.Exception.ExceptionCallFile, receiver.Exception.ExceptionCallFuncName, receiver.Exception.ExceptionCallLine = trace.GetCallerInfo()
}
}

func (receiver *TraceContext) GetAppInfo() (int64, string, int64, string, string) {
return receiver.TraceId, receiver.AppName, receiver.AppId, receiver.AppIp, receiver.ParentAppName
}

0 comments on commit 3d62e4f

Please sign in to comment.