Skip to content

Commit

Permalink
调整:链路追踪End接受error参数,
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Sep 16, 2024
1 parent 7387226 commit 500f8e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions traceManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (*traceManager) EntryWebApi(domain string, path string, method string, cont
}

// EntryWebSocket WebSocket入口
func (*traceManager) EntryWebSocket(domain string, path string, method string, contentType string, header map[string]string, requestIp string) trace.ITraceContext {
func (*traceManager) EntryWebSocket(domain string, path string, contentType string, header map[string]string, requestIp string) trace.ITraceContext {
headerDictionary := collections.NewDictionaryFromMap(header)
traceId := parse.ToString(headerDictionary.GetValue("Trace-Id"))
traceLevel := parse.ToInt(headerDictionary.GetValue("Trace-Level"))
Expand All @@ -82,7 +82,7 @@ func (*traceManager) EntryWebSocket(domain string, path string, method string, c
WebContext: WebContext{
WebDomain: domain,
WebPath: path,
WebMethod: method,
WebMethod: "WEBSOCKET",
WebContentType: contentType,
WebHeaders: headerDictionary.ToDictionary(),
WebRequestBody: "Conn",
Expand Down
2 changes: 1 addition & 1 deletion trackContext.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (receiver *TraceContext) GetStartTs() int64 {
}

// End 结束当前链路
func (receiver *TraceContext) End() {
func (receiver *TraceContext) End(err error) {
// 清空当前上下文
trace.CurTraceContext.Remove()

Expand Down

0 comments on commit 500f8e6

Please sign in to comment.