Add AI job stage metrics
Some checks failed
CI / test (push) Failing after 8s
Build and Deploy / build-and-deploy (push) Successful in 34s

This commit is contained in:
Grendgi
2026-06-10 16:07:21 +03:00
parent 2a481fdc54
commit 3c2f13b967
2 changed files with 51 additions and 1 deletions

View File

@@ -119,6 +119,16 @@ type ErrorStat struct {
Last24h int64 `json:"last_24h"`
}
type StageStat struct {
OwnerService string `json:"owner_service"`
TaskType string `json:"task_type"`
ModelProfile string `json:"model_profile"`
Done24h int64 `json:"done_24h"`
AvgDurationSeconds int64 `json:"avg_duration_seconds"`
AvgAttempts int64 `json:"avg_attempts"`
Retried24h int64 `json:"retried_24h"`
}
type OwnerStat struct {
OwnerService string `json:"owner_service"`
TaskType string `json:"task_type"`
@@ -132,4 +142,5 @@ type Stats struct {
Queues []QueueStat `json:"queues"`
Owners []OwnerStat `json:"owners,omitempty"`
Errors []ErrorStat `json:"errors,omitempty"`
Stages []StageStat `json:"stages,omitempty"`
}