Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion genkit-tools/common/src/types/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const SpanDataSchema = z
status: SpanStatusSchema.optional(),
timeEvents: z
.object({
timeEvent: z.array(TimeEventSchema),
timeEvent: z.array(TimeEventSchema).optional(),
})
.optional(),
truncated: z.boolean().optional(),
Expand Down
1 change: 1 addition & 0 deletions go/genkit/file_trace_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func (s *FileTraceStore) Save(ctx context.Context, id string, td *TraceData) err
for k, v := range td.Spans {
existing.Spans[k] = v
}
existing.TraceID = id
existing.DisplayName = td.DisplayName
existing.StartTime = td.StartTime
existing.EndTime = td.EndTime
Expand Down
1 change: 1 addition & 0 deletions go/genkit/file_trace_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func TestFileTraceStore(t *testing.T) {
t.Fatal(err)
}
want := &TraceData{
TraceID: "id1",
DisplayName: "td2",
StartTime: 30,
EndTime: 40,
Expand Down
1 change: 1 addition & 0 deletions go/genkit/testdata/trace.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
}
}
},
"traceId": "0eede9d8c037dddbf32a307be30dc9a0",
"displayName": "dev-run-action-wrapper",
"startTime": 1710862641406000,
"endTime": 1710862641430246.5
Expand Down
1 change: 1 addition & 0 deletions go/genkit/trace_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type TraceQuery struct {

// TraceData is information about a trace.
type TraceData struct {
TraceID string `json:"traceId"`
DisplayName string `json:"displayName"`
StartTime Milliseconds `json:"startTime"`
EndTime Milliseconds `json:"endTime"`
Expand Down