Skip to content

Commit

Permalink
调整:如果链路列表没有数据,且不是WebApi,则过滤
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jul 14, 2024
1 parent ae107fb commit 726f6b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions saveTraceContextConsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/farseer-go/fs/exception"
"github.com/farseer-go/fs/parse"
"github.com/farseer-go/fs/trace"
"github.com/farseer-go/linkTrace/eumTraceType"
"net/http"
)

Expand All @@ -27,6 +28,9 @@ func SaveTraceContextConsumer(subscribeName string, lstMessage collections.ListA
lstMessage.Foreach(func(item *any) {
// 上下文
dto := (*item).(TraceContext)
if len(dto.List) == 0 && dto.TraceType != eumTraceType.WebApi {
return
}
lstTraceContext.Add(dto)
})
if err := uploadTrace(lstTraceContext); err != nil {
Expand Down

0 comments on commit 726f6b6

Please sign in to comment.