metrics

package
v0.6.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiscoveryAPICacheRefreshMetricName        = "agent_discoveryapi_cache_refresh_total"
	DiscoveryAPICacheRefreshMetricDescription = "The total number of Discovery API cache refresh attempts"

	DiscoveryAPICacheRefreshErrorMetricName        = "agent_discoveryapi_cache_refresh_error_total"
	DiscoveryAPICacheRefreshErrorMetricDescription = "The total number of Discovery API cache refresh errors"

	ServiceReconciliationMetricName        = "agent_service_reconciliations_total"
	ServiceReconciliationMetricDescription = "The total number of service reconciliations"

	ServiceReconciliationErrorMetricName        = "agent_service_reconciliation_errors_total"
	ServiceReconciliationErrorMetricDescription = "The total number of service reconciliation errors"

	ServiceReconciliationDurationMetricName        = "agent_service_reconcile_duration_seconds"
	ServiceReconciliationDurationMetricDescription = "The time it takes to reconcile a service"

	StackRunJobsCreatedMetricName        = "agent_stack_runs_created_total"
	StackRunJobsCreatedMetricDescription = "The total number of created stack runs"

	ResourceCacheOpenWatchesName        = "agent_resource_cache_open_watches_total"
	ResourceCacheOpenWatchesDescription = "The total number of open watches in the resource cache"

	ResourceCacheHitMetricName        = "agent_resource_cache_hit_total"
	ResourceCacheHitMetricDescription = "The total number of resource cache hits"

	ResourceCacheMissMetricName        = "agent_resource_cache_miss_total"
	ResourceCacheMissMetricDescription = "The total number of resource cache misses"

	MetricLabelServiceID                  = "service_id"
	MetricLabelServiceName                = "service_name"
	MetricLabelServiceType                = "service_type"
	MetricLabelServiceReconciliationStage = "service_reconciliation_stage"
	MetricLabelControllerName             = "controller_name"

	ControllerRestartsMetricName        = "agent_controller_restarts_total"
	ControllerRestartsMetricDescription = "The total number of controller restarts"

	SynchronizerEventMetricName        = "agent_synchronizer_event_total"
	SynchronizerEventMetricDescription = "The total number of synchronizer events"

	MetricLabelSynchronizerEventType = "synchronizer_event_type"
	MetricLabelSynchronizerGroup     = "synchronizer_group"
	MetricLabelSynchronizerVersion   = "synchronizer_version"
	MetricLabelSynchronizerKind      = "synchronizer_kind"
)

Variables

This section is empty.

Functions

func FromContext

func FromContext[T any](ctx context.Context, key ContextKey) (T, error)

Types

type ContextKey

type ContextKey string
const (
	ContextKeyTimeStart ContextKey = "time_start"
)

type Recorder

type Recorder interface {
	DiscoveryAPICacheRefresh(err error)
	ServiceReconciliation(serviceID, serviceName string, options ...ServiceReconciliationOption)
	ServiceDeletion(serviceID string)
	StackRunJobCreation()
	ResourceCacheWatchStart(resourceType string)
	ResourceCacheWatchEnd(resourceType string)
	ResourceCacheWatchRemove(resourceType string)
	ResourceCacheHit(serviceID string)
	ResourceCacheMiss(serviceID string)
	ControllerRestart(name string)
	SynchronizationEvent(event watch.Event)
}

func Record

func Record() Recorder

type ServiceReconciliationOption

type ServiceReconciliationOption func(*serviceReconciliationOptions)

func WithServiceReconciliationError

func WithServiceReconciliationError(err error) ServiceReconciliationOption

func WithServiceReconciliationStartedAt

func WithServiceReconciliationStartedAt(startedAt time.Time) ServiceReconciliationOption

type ServiceReconciliationStage

type ServiceReconciliationStage string
const (
	ServiceReconciliationStart                  ServiceReconciliationStage = "start"
	ServiceReconciliationPrepareManifestsFinish ServiceReconciliationStage = "prepare_manifests_finish"
	ServiceReconciliationApplyStart             ServiceReconciliationStage = "apply_start"
	ServiceReconciliationApplyFinish            ServiceReconciliationStage = "apply_finish"
	ServiceReconciliationUpdateStatusFinish     ServiceReconciliationStage = "update_status_finish"
	ServiceReconciliationFinish                 ServiceReconciliationStage = "finish"
)

func (ServiceReconciliationStage) String

func (in ServiceReconciliationStage) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL