metrics

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameLabel      = "name"
	InstalledLabel = "installed"
	NamespaceLabel = "namespace"
	ChannelLabel   = "channel"
	VersionLabel   = "version"
	PhaseLabel     = "phase"
	ReasonLabel    = "reason"
	PackageLabel   = "package"
	Outcome        = "outcome"
	Succeeded      = "succeeded"
	Failed         = "failed"
	ApprovalLabel  = "approval"
	WarningLabel   = "warning"
	GVKLabel       = "gvk"
)

Variables

View Source
var (

	// exported since it's not handled by HandleMetrics
	CSVUpgradeCount = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "csv_upgrade_count",
			Help: "Monotonic count of CSV upgrades",
		},
	)

	SubscriptionSyncCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "subscription_sync_total",
			Help: "Monotonic count of subscription syncs",
		},
		[]string{NameLabel, InstalledLabel, ChannelLabel, PackageLabel, ApprovalLabel},
	)
)

To add new metrics: 1. Register new metrics in Register() below. 2. Add appropriate metric updates in HandleMetrics (or elsewhere instead).

Functions

func CounterForSubscription

func CounterForSubscription(name, installedCSV, channelName, packageName, planApprovalStrategy string) prometheus.Counter

func DeleteCSVMetric

func DeleteCSVMetric(oldCSV *operatorsv1alpha1.ClusterServiceVersion)

func DeleteCatalogSourceStateMetric added in v0.18.2

func DeleteCatalogSourceStateMetric(name, namespace string)

func DeleteSubsMetric

func DeleteSubsMetric(sub *operatorsv1alpha1.Subscription)

func EmitAdoptionCSVReconcile added in v0.21.0

func EmitAdoptionCSVReconcile(namespace, name string)

func EmitAdoptionSubscriptionReconcile added in v0.21.0

func EmitAdoptionSubscriptionReconcile(namespace, name string)

func EmitInstallPlanWarning added in v0.18.2

func EmitInstallPlanWarning()

func EmitOperatorConditionGeneratorReconcile added in v0.21.0

func EmitOperatorConditionGeneratorReconcile(namespace, name string)

func EmitOperatorConditionReconcile added in v0.21.0

func EmitOperatorConditionReconcile(namespace, name string)

func EmitOperatorReconcile added in v0.21.0

func EmitOperatorReconcile(namespace, name string)

func EmitSubMetric

func EmitSubMetric(sub *operatorsv1alpha1.Subscription)

func RegisterCatalog

func RegisterCatalog()

func RegisterCatalogSourceState added in v0.18.2

func RegisterCatalogSourceState(name, namespace string, state connectivity.State)

func RegisterDependencyResolutionFailure

func RegisterDependencyResolutionFailure(duration time.Duration)

func RegisterDependencyResolutionSuccess

func RegisterDependencyResolutionSuccess(duration time.Duration)

func RegisterOLM

func RegisterOLM()

func UpdateSubsSyncCounterStorage

func UpdateSubsSyncCounterStorage(sub *operatorsv1alpha1.Subscription)

Types

type MetricsNil

type MetricsNil struct{}

func (*MetricsNil) HandleMetrics

func (*MetricsNil) HandleMetrics() error

type MetricsProvider

type MetricsProvider interface {
	HandleMetrics() error
}

func NewMetricsCatalogSource

func NewMetricsCatalogSource(lister v1alpha1.CatalogSourceLister) MetricsProvider

func NewMetricsInstallPlan

func NewMetricsInstallPlan(lister v1alpha1.InstallPlanLister) MetricsProvider

func NewMetricsNil

func NewMetricsNil() MetricsProvider

func NewMetricsSubscription

func NewMetricsSubscription(lister v1alpha1.SubscriptionLister) MetricsProvider

Jump to

Keyboard shortcuts

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