Documentation ¶
Index ¶
- Constants
- Variables
- func CounterForSubscription(name, installedCSV, channelName, packageName, planApprovalStrategy string) prometheus.Counter
- func DeleteCSVMetric(oldCSV *operatorsv1alpha1.ClusterServiceVersion)
- func DeleteCatalogSourceStateMetric(name, namespace string)
- func DeleteSubsMetric(sub *operatorsv1alpha1.Subscription)
- func EmitAdoptionCSVReconcile(namespace, name string)
- func EmitAdoptionSubscriptionReconcile(namespace, name string)
- func EmitCSVMetric(oldCSV *operatorsv1alpha1.ClusterServiceVersion, ...)
- func EmitInstallPlanWarning()
- func EmitOperatorConditionGeneratorReconcile(namespace, name string)
- func EmitOperatorConditionReconcile(namespace, name string)
- func EmitOperatorReconcile(namespace, name string)
- func EmitSubMetric(sub *operatorsv1alpha1.Subscription)
- func RegisterCatalog()
- func RegisterCatalogSourceState(name, namespace string, state connectivity.State)
- func RegisterDependencyResolutionFailure(duration time.Duration)
- func RegisterDependencyResolutionSuccess(duration time.Duration)
- func RegisterOLM()
- func UpdateSubsSyncCounterStorage(sub *operatorsv1alpha1.Subscription)
- type MetricsNil
- type MetricsProvider
- func NewMetricsCSV(lister v1alpha1.ClusterServiceVersionLister) MetricsProvider
- func NewMetricsCatalogSource(lister v1alpha1.CatalogSourceLister) MetricsProvider
- func NewMetricsInstallPlan(lister v1alpha1.InstallPlanLister) MetricsProvider
- func NewMetricsNil() MetricsProvider
- func NewMetricsSubscription(lister v1alpha1.SubscriptionLister) MetricsProvider
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 EmitCSVMetric ¶
func EmitCSVMetric(oldCSV *operatorsv1alpha1.ClusterServiceVersion, newCSV *operatorsv1alpha1.ClusterServiceVersion)
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 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 NewMetricsCSV ¶
func NewMetricsCSV(lister v1alpha1.ClusterServiceVersionLister) MetricsProvider
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
Click to show internal directories.
Click to hide internal directories.