Add AI queue backlog metrics
This commit is contained in:
@@ -129,6 +129,16 @@ type StageStat struct {
|
||||
Retried24h int64 `json:"retried_24h"`
|
||||
}
|
||||
|
||||
type BacklogStat struct {
|
||||
OwnerService string `json:"owner_service"`
|
||||
TaskType string `json:"task_type"`
|
||||
ModelProfile string `json:"model_profile"`
|
||||
Pending int64 `json:"pending"`
|
||||
Running int64 `json:"running"`
|
||||
OldestPendingAgeSeconds int64 `json:"oldest_pending_age_seconds"`
|
||||
OldestPendingScheduledAt string `json:"oldest_pending_scheduled_at,omitempty"`
|
||||
}
|
||||
|
||||
type OwnerStat struct {
|
||||
OwnerService string `json:"owner_service"`
|
||||
TaskType string `json:"task_type"`
|
||||
@@ -138,9 +148,10 @@ type OwnerStat struct {
|
||||
}
|
||||
|
||||
type Stats struct {
|
||||
At time.Time `json:"at"`
|
||||
Queues []QueueStat `json:"queues"`
|
||||
Owners []OwnerStat `json:"owners,omitempty"`
|
||||
Errors []ErrorStat `json:"errors,omitempty"`
|
||||
Stages []StageStat `json:"stages,omitempty"`
|
||||
At time.Time `json:"at"`
|
||||
Queues []QueueStat `json:"queues"`
|
||||
Owners []OwnerStat `json:"owners,omitempty"`
|
||||
Errors []ErrorStat `json:"errors,omitempty"`
|
||||
Stages []StageStat `json:"stages,omitempty"`
|
||||
Backlog []BacklogStat `json:"backlog,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user