Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Oct 14, 2023
1 parent 32c6b96 commit 5756ce7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
23 changes: 23 additions & 0 deletions TrackContext.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package linkTrace

import "github.com/farseer-go/collections"

type TrackContext struct {
ParentAppName string // 上游应用
TraceId string // 上下文ID
StartTs int64 // 调用开始时间戳
EndTs int64 // 调用结束时间戳
UseTs int64 // 总共使用时间毫秒
LinkType EumLinkType // 状态码
Domain string // 请求域名
Path string // 请求地址
Method string // 请求方式
ContentType string // 请求内容类型
StatusCode string // 状态码
Headers collections.Dictionary[string, string] // 请求头部
RequestBody string // 请求参数
ResponseBody string // 输出参数
RequestIp string // 客户端IP
List collections.List[LinkTrackDetail] // 调用的上下文
ExceptionDetail ExceptionDetail // 是否执行异常
}
2 changes: 1 addition & 1 deletion global.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package linkTrack
package linkTrace

import (
"github.com/timandy/routine"
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module github.com/farseer-go/linkTrack
module github.com/farseer-go/linkTrace

go 1.19

require (
github.com/farseer-go/collections v0.8.0
github.com/farseer-go/fs v0.8.0
github.com/farseer-go/utils v0.8.0
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203
github.com/timandy/routine v1.1.1
)

require (
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
)
4 changes: 0 additions & 4 deletions linkTrackConfig.go

This file was deleted.

0 comments on commit 5756ce7

Please sign in to comment.