Documentation
¶
Overview ¶
pkg/metrics/autoscale.go
pkg/metrics/deletion_protection.go
pkg/metrics/namespace_protection.go
pkg/metrics/webhook_reconciliation.go
Index ¶
- Constants
- func DecConversionRequests()
- func IncConversionRequests()
- func InitAutoscaleBaseline(crd string, workers int)
- func ObserveCRDActivationLatency(crd string, seconds float64)
- func ObserveConversionDuration(kind, fromVersion, toVersion string, seconds float64)
- func ObserveProviderDuration(crd, provider, kind string, seconds float64)
- func ObserveReconcileDuration(gvk string, seconds float64)
- func RecordAutoscaleOverride(crd string, workers int)
- func RecordAutoscaleRestore(crd string, baselineWorkers int)
- func RecordCRDActivation(crd, result string)
- func RecordConversion(kind, fromVersion, toVersion, result string)
- func RecordConversionError(kind, errorType string)
- func RecordDeletionProtectionBlocked(resource string)
- func RecordDockerOperation(crd, image, operation, err string, durationSeconds float64)
- func RecordExternalCall(crd, name, url string, durationSeconds float64, err string, statusCode int)
- func RecordGitOperation(crd, repo, operation, err string, durationSeconds float64)
- func RecordMutationDurationSeconds(crd string, seconds float64)
- func RecordMutationFieldApplied(crd, field, mutationType, source string)
- func RecordMutationFieldDetail(crd, field, mutationType string)
- func RecordMutationOutcome(crd, result, source string)
- func RecordMutationTotal(crd string)
- func RecordNamespaceProtectionBlocked(resource string)
- func RecordProviderDelete(crd, provider, kind, result string)
- func RecordProviderReconcile(crd, provider, kind, result string)
- func RecordReconcile(gvk, result string)
- func RecordValidationDurationSeconds(crd string, seconds float64)
- func RecordValidationOutcome(crd, result, source string)
- func RecordValidationViolation(crd, field, rule, action, source string)
- func RecordWebhookReconciled(webhookType string)
- func RecordWebhookReconciliationFailure(webhookType string)
- func SetAutoscaleActive(crd string, active bool)
- func SetQueueDepth(gvk string, depth float64)
- func SetResourceCount(gvk string, count float64)
- func SetWorkersIdle(gvk string, value float64)
- func SetWorkersProcessing(gvk string, value float64)
- func SetWorkersTotal(gvk string, value float64)
Constants ¶
const ( // MetricSourceAdmission labels metrics originating from /validate or /mutate calls. MetricSourceAdmission = "admission" // MetricSourceReconcile labels metrics originating from the reconcile loop. MetricSourceReconcile = "reconcile" )
Variables ¶
This section is empty.
Functions ¶
func DecConversionRequests ¶
func DecConversionRequests()
DecConversionRequests decrements the in-flight conversion request gauge.
func IncConversionRequests ¶
func IncConversionRequests()
IncConversionRequests increments the in-flight conversion request gauge.
func InitAutoscaleBaseline ¶
InitAutoscaleBaseline records the initial worker count at startup. Called once per operatorBox: when the autoscaler is started.
func ObserveCRDActivationLatency ¶
ObserveCRDActivationLatency records how long a CRD took to become active.
func ObserveConversionDuration ¶
ObserveConversionDuration records a conversion duration observation.
func ObserveProviderDuration ¶
ObserveProviderDuration records how long a provider reconcile call took.
func ObserveReconcileDuration ¶
ObserveReconcileDuration records a reconcile duration observation.
func RecordAutoscaleOverride ¶
RecordAutoscaleOverride records a scale override event.
func RecordAutoscaleRestore ¶
RecordAutoscaleRestore records a baseline restore event.
func RecordCRDActivation ¶
func RecordCRDActivation(crd, result string)
RecordCRDActivation increments the CRD activation counter.
func RecordConversion ¶
func RecordConversion(kind, fromVersion, toVersion, result string)
RecordConversion increments the conversion request counter.
func RecordConversionError ¶
func RecordConversionError(kind, errorType string)
RecordConversionError increments the conversion error counter.
func RecordDeletionProtectionBlocked ¶
func RecordDeletionProtectionBlocked(resource string)
RecordDeletionProtectionBlocked increments the blocked deletion counter. resource is the CRD full name (e.g. "pipelines.platform.io") or "orkestra-deployment" when the Orkestra deployment itself was protected.
func RecordDockerOperation ¶
RecordDockerOperation records a Docker operation result and duration.
func RecordExternalCall ¶
RecordExternalCall is a convenience helper for recording metrics after an external call.
func RecordGitOperation ¶
RecordGitOperation records a Git operation result and duration.
func RecordMutationDurationSeconds ¶
RecordMutationDurationSeconds observes the duration of a /mutate call.
func RecordMutationFieldApplied ¶
func RecordMutationFieldApplied(crd, field, mutationType, source string)
RecordMutationFieldApplied increments the per-field mutation counter.
func RecordMutationFieldDetail ¶
func RecordMutationFieldDetail(crd, field, mutationType string)
RecordMutationFieldDetail increments the per-field reconcile-time mutation counter.
func RecordMutationOutcome ¶
func RecordMutationOutcome(crd, result, source string)
RecordMutationOutcome increments the aggregate mutation counter.
func RecordMutationTotal ¶
func RecordMutationTotal(crd string)
RecordMutationTotal increments the reconcile-time mutation counter for a CRD.
func RecordNamespaceProtectionBlocked ¶ added in v0.1.9
func RecordNamespaceProtectionBlocked(resource string)
RecordNamespaceProtectionBlocked increments the blocked namespace protection counter. resource is the CRD plural name (e.g. "pipelines") of the resource that was blocked.
func RecordProviderDelete ¶
func RecordProviderDelete(crd, provider, kind, result string)
RecordProviderDelete increments the provider delete counter.
func RecordProviderReconcile ¶
func RecordProviderReconcile(crd, provider, kind, result string)
RecordProviderReconcile increments the provider reconcile counter. Call after each provider.Reconcile() or provider.Delete() returns.
func RecordReconcile ¶
func RecordReconcile(gvk, result string)
RecordReconcile increments the reconcile counter for a CRD.
func RecordValidationDurationSeconds ¶
RecordValidationDurationSeconds observes the duration of a /validate call. Only call this for source=admission — reconcile durations use a different histogram.
func RecordValidationOutcome ¶
func RecordValidationOutcome(crd, result, source string)
RecordValidationOutcome increments the aggregate validation counter.
func RecordValidationViolation ¶
func RecordValidationViolation(crd, field, rule, action, source string)
RecordValidationViolation increments the per-field violation counter.
func RecordWebhookReconciled ¶
func RecordWebhookReconciled(webhookType string)
RecordWebhookReconciled increments the reconciliation counter for a webhook type. webhookType is one of:
- "validating"
- "mutating"
- "deletion-protection"
func RecordWebhookReconciliationFailure ¶
func RecordWebhookReconciliationFailure(webhookType string)
RecordWebhookReconciliationFailure increments the failure counter for a webhook type.
func SetAutoscaleActive ¶
SetAutoscaleActive records an active state change.
func SetQueueDepth ¶
SetQueueDepth sets the queue depth gauge for a CRD.
func SetResourceCount ¶
SetResourceCount sets the resource count gauge for a CRD.
func SetWorkersIdle ¶
func SetWorkersProcessing ¶
func SetWorkersTotal ¶
Types ¶
This section is empty.