Skip to content

Commit

Permalink
链路追踪,增加EntryWebSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Sep 2, 2024
1 parent 0195bf8 commit bfa1b80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion trace/emptyManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ package trace
type EmptyManager struct {
}

func (*EmptyManager) EntryWebApi(domain string, path string, method string, contentType string, header map[string]string, requestBody string, requestIp string) ITraceContext {
func (*EmptyManager) EntryWebApi(domain string, path string, method string, contentType string, header map[string]string, requestIp string) ITraceContext {
return &emptyTraceContext{}
}
func (*EmptyManager) EntryWebSocket(domain string, path string, method string, contentType string, header map[string]string, requestIp string) ITraceContext {
return &emptyTraceContext{}
}

Expand Down
4 changes: 3 additions & 1 deletion trace/iManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ type IManager interface {
// GetTraceId 获取当前TraceId
GetTraceId() string
// EntryWebApi 创建webapi的链路追踪入口
EntryWebApi(domain string, path string, method string, contentType string, headerDictionary map[string]string, requestBody string, requestIp string) ITraceContext
EntryWebApi(domain string, path string, method string, contentType string, headerDictionary map[string]string, requestIp string) ITraceContext
// EntryWebSocket 创建WebSocket的链路追踪入口
EntryWebSocket(domain string, path string, method string, contentType string, header map[string]string, requestIp string) ITraceContext
// EntryMqConsumer 创建MQ消费入口
EntryMqConsumer(parentTraceId, parentAppName, server string, queueName string, routingKey string) ITraceContext
// EntryQueueConsumer 创建Queue消费入口
Expand Down

0 comments on commit bfa1b80

Please sign in to comment.