fix: use 'unknown' for null framework, run gofmt
This commit is contained in:
@@ -12,11 +12,11 @@ type FrameworkStats struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Summary struct {
|
type Summary struct {
|
||||||
ActiveSessions int `json:"active_sessions"`
|
ActiveSessions int `json:"active_sessions"`
|
||||||
RunsToday int `json:"runs_today"`
|
RunsToday int `json:"runs_today"`
|
||||||
ToolCallsToday int `json:"tool_calls_today"`
|
ToolCallsToday int `json:"tool_calls_today"`
|
||||||
ErrorsToday int `json:"errors_today"`
|
ErrorsToday int `json:"errors_today"`
|
||||||
ByFramework map[string]FrameworkStats `json:"by_framework"`
|
ByFramework map[string]FrameworkStats `json:"by_framework"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TimeseriesBucket struct {
|
type TimeseriesBucket struct {
|
||||||
@@ -59,7 +59,7 @@ func (d *DB) GetSummary(ctx context.Context) (*Summary, error) {
|
|||||||
// Per-framework aggregates for today
|
// Per-framework aggregates for today
|
||||||
fwQ := `
|
fwQ := `
|
||||||
SELECT
|
SELECT
|
||||||
COALESCE(source_framework, ''),
|
COALESCE(source_framework, 'unknown'),
|
||||||
COUNT(*) FILTER (WHERE type = 'run.start') AS runs,
|
COUNT(*) FILTER (WHERE type = 'run.start') AS runs,
|
||||||
COUNT(*) FILTER (WHERE type = 'span.end'
|
COUNT(*) FILTER (WHERE type = 'span.end'
|
||||||
AND payload->'attributes'->>'span_kind' = 'tool') AS tools,
|
AND payload->'attributes'->>'span_kind' = 'tool') AS tools,
|
||||||
|
|||||||
Reference in New Issue
Block a user