File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
backend/modules/observability
application/convertor/trace
domain/trace/entity/loop_span Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,8 @@ func MetricsInfoDO2DTO(info *loop_span.MetricsInfo) *dtotrajectory.MetricsInfo {
135135 ModelErrors : info .ModelErrors ,
136136 ModelErrorRate : info .ModelErrorRate ,
137137 ToolStepProportion : info .ToolStepProportion ,
138+ InputTokens : info .InputTokens ,
139+ OutputTokens : info .OutputTokens ,
138140 }
139141}
140142
Original file line number Diff line number Diff line change @@ -138,14 +138,13 @@ func BuildTrajectoryFromSpans(spanList SpanList) *Trajectory {
138138 spanMap [span .SpanID ] = span
139139 }
140140
141- var trajectoryID * string
141+ trajectoryID := ptr . Of ( spanList [ 0 ]. TraceID )
142142
143143 // 找到root节点
144144 var rootSpan * Span
145145 for _ , span := range spanList {
146146 if span .ParentID == "" || span .ParentID == "0" {
147147 rootSpan = span
148- trajectoryID = & span .SpanID
149148 break
150149 }
151150 }
@@ -181,9 +180,6 @@ func BuildTrajectoryFromSpans(spanList SpanList) *Trajectory {
181180 if agentSpan == nil {
182181 continue
183182 }
184- if trajectoryID == nil {
185- trajectoryID = & agentSpan .SpanID
186- }
187183 agentStep := & AgentStep {
188184 ID : & agentSpan .SpanID ,
189185 ParentID : & agentSpan .ParentID ,
Original file line number Diff line number Diff line change 6666 DataType : dataTypeString ,
6767 },
6868 "psm" : {
69- attributeKey : []string {"service.name" },
70- isTag : false ,
71- dataType : dataTypeString ,
69+ AttributeKey : []string {"service.name" },
70+ IsTag : false ,
71+ DataType : dataTypeString ,
7272 },
7373
7474 // model
You can’t perform that action at this time.
0 commit comments