Skip to content

Commit

Permalink
添加N字段
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jan 2, 2024
1 parent b19b8f4 commit 04d758b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trackContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type TraceContext struct {
TraceIdN string // 上下文ID
TraceId int64 // 上下文ID
AppId int64 // 应用ID
AppIdN string // 应用ID
AppName string // 应用名称
AppIp string // 应用IP
ParentAppName string // 上游应用
Expand Down Expand Up @@ -180,6 +181,8 @@ func (receiver *TraceContext) GetAppInfo() (int64, string, int64, string, string
return receiver.TraceId, receiver.AppName, receiver.AppId, receiver.AppIp, receiver.ParentAppName
}

// SetTraceIdN Int64转String(前端需要)
func (receiver *TraceContext) SetTraceIdN() {
receiver.TraceIdN = parse.ToString(receiver.TraceId)
receiver.AppIdN = parse.ToString(receiver.AppId)
}

0 comments on commit 04d758b

Please sign in to comment.