Documentation
¶
Index ¶
- Constants
- func RenderPrometheus(snapshot Snapshot, now time.Time, maxStaleness time.Duration) string
- func ServiceNames() []string
- type Collector
- type CreatedVisibilityTracker
- type DiagnosticExportSource
- type DiagnosticExportSync
- type DiagnosticsSource
- type Handler
- type HostSource
- type IncusSummary
- type InstanceSource
- type JournalSource
- type JournalSummary
- type PoolStatus
- type ProviderRetrySource
- type QueueIntentSource
- type QueueSummary
- type ServiceSource
- type ServiceStatus
- type Snapshot
- type State
Constants ¶
View Source
const ( // 14 separates first-observed created-to-deleting inventory convergence from // persistent missing ownership. 13 adds bounded GitHub run/request/runner correlation completeness. 12 separates bounded successful-delete convergence from persistent missing // runner ownership. 11 separated exact image builder/smoke inventory from orphan job runners. // 9 added exact JobStarted runner correlation and symmetric created-without- // running identity telemetry. Version 8 added role-correct central exporter // health, container admission readiness, phase ages and rollback-compatible // WAL progress semantics. SchemaVersion = 14 )
Variables ¶
This section is empty.
Functions ¶
func RenderPrometheus ¶
func ServiceNames ¶
func ServiceNames() []string
Types ¶
type Collector ¶
type Collector struct {
Config config.Config
Host HostSource
Journal JournalSource
ProviderRetry ProviderRetrySource
Queue QueueIntentSource
Instances InstanceSource
Diagnostics DiagnosticsSource
Export DiagnosticExportSource
Service ServiceSource
DiagnosticMaxBytes int64
Now func() time.Time
CreatedVisibility *CreatedVisibilityTracker
}
type CreatedVisibilityTracker ¶
type CreatedVisibilityTracker struct {
// contains filtered or unexported fields
}
CreatedVisibilityTracker remembers when a created lease was first observed absent from Incus. Lease age cannot answer this question: a worker can run for hours before terminal teardown creates a short journal/inventory race.
func NewCreatedVisibilityTracker ¶
func NewCreatedVisibilityTracker() *CreatedVisibilityTracker
type DiagnosticExportSource ¶
type DiagnosticExportSource func() (diagnosticexport.Status, error)
type DiagnosticExportSync ¶
type DiagnosticsSource ¶
type DiagnosticsSource func(time.Time) (workerdiagnostics.SpoolStats, error)
type IncusSummary ¶
type IncusSummary struct {
VisibleInstances int `json:"visible_instances"`
VisibleMaintenanceInstances int `json:"visible_maintenance_instances"`
OrphanInstances int `json:"orphan_instances"`
MissingInstances int `json:"missing_instances"`
MissingDeletingWithinGrace int `json:"missing_deleting_within_grace"`
MissingCreatedWithinGrace int `json:"missing_created_within_grace"`
OldestMissingCreatedAgeSecs int64 `json:"oldest_missing_created_within_grace_age_seconds"`
MissingMaintenanceInstances int `json:"missing_maintenance_instances"`
}
type JournalSource ¶
type JournalSource func(context.Context) (providerjournal.Journal, error)
type JournalSummary ¶
type JournalSummary struct {
SchemaVersion int `json:"schema_version"`
Generation uint64 `json:"generation"`
UpdatedAt time.Time `json:"updated_at"`
Leases int `json:"leases"`
Claims int `json:"claims"`
WarmPreemptions int `json:"warm_preemptions"`
WarmPreemptionsTotal uint64 `json:"warm_preemptions_total"`
ByState map[string]int `json:"by_state"`
OldestStateAgeSeconds map[string]int64 `json:"oldest_state_age_seconds"`
CreatedWithoutRunningIdentity int `json:"created_without_running_identity"`
OldestCreatedWithoutRunningIdentityAgeSeconds int64 `json:"oldest_created_without_running_identity_age_seconds"`
}
type PoolStatus ¶
type ProviderRetrySource ¶
type ProviderRetrySource func(time.Time) (providerretry.Snapshot, error)
type QueueIntentSource ¶
type QueueIntentSource func(context.Context) (queueintent.Snapshot, error)
type QueueSummary ¶
type QueueSummary struct {
Generation uint64 `json:"generation"`
Stored int `json:"stored"`
Active int `json:"active"`
Expired int `json:"expired"`
InFlight int `json:"in_flight"`
OldestQueueAgeSeconds int64 `json:"oldest_queue_age_seconds"`
UncoveredRunning int `json:"uncovered_running"`
RunningWithoutRunnerIdentity int `json:"running_without_runner_identity"`
UnboundRepository int `json:"unbound_repository"`
MissingRunnerRequestID int `json:"missing_runner_request_id"`
DirectJITWithoutRequestID int `json:"direct_jit_without_runner_request_id"`
MissingWorkflowRunID int `json:"missing_workflow_run_id"`
RunningMissingGitHubRunnerID int `json:"running_missing_github_runner_id"`
ByState map[string]int `json:"by_state"`
OldestStateAgeSeconds map[string]int64 `json:"oldest_state_age_seconds"`
ByPriority map[int]int `json:"by_priority"`
ByScaleSet map[string]int `json:"by_scale_set"`
}
type ServiceStatus ¶
type Snapshot ¶
type Snapshot struct {
SchemaVersion int `json:"schema_version"`
CapturedAt time.Time `json:"captured_at"`
Healthy bool `json:"healthy"`
Host hostprobe.Snapshot `json:"host"`
Pools []PoolStatus `json:"pools"`
Journal JournalSummary `json:"journal"`
ProviderRetry providerretry.Snapshot `json:"provider_retry"`
Queue QueueSummary `json:"queue"`
Incus IncusSummary `json:"incus"`
Diagnostics workerdiagnostics.SpoolStats `json:"diagnostics"`
DiagnosticExport diagnosticexport.Status `json:"diagnostic_export"`
DiagnosticExportSync DiagnosticExportSync `json:"diagnostic_export_sync"`
Services []ServiceStatus `json:"services"`
CollectionErrors []string `json:"collection_errors"`
}
Click to show internal directories.
Click to hide internal directories.