Documentation
¶
Index ¶
- Constants
- Variables
- func CounterForSubscription(name, installedCSV, channelName, packageName, planApprovalStrategy string) prometheus.Counter
- func DeleteCSVMetric(oldCSV *olmv1alpha1.ClusterServiceVersion)
- func DeleteCatalogSourceStateMetric(name, namespace string)
- func DeleteSubsMetric(sub *olmv1alpha1.Subscription)
- func EmitCSVMetric(oldCSV *olmv1alpha1.ClusterServiceVersion, ...)
- func EmitInstallPlanWarning()
- func EmitSubMetric(sub *olmv1alpha1.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 *olmv1alpha1.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 ( NAME_LABEL = "name" INSTALLED_LABEL = "installed" NAMESPACE_LABEL = "namespace" CHANNEL_LABEL = "channel" VERSION_LABEL = "version" PHASE_LABEL = "phase" REASON_LABEL = "reason" PACKAGE_LABEL = "package" Outcome = "outcome" Succeeded = "succeeded" Failed = "failed" APPROVAL_LABEL = "approval" WARNING_LABEL = "warning" GVK_LABEL = "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{NAME_LABEL, INSTALLED_LABEL, CHANNEL_LABEL, PACKAGE_LABEL, APPROVAL_LABEL}, ) )
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 *olmv1alpha1.ClusterServiceVersion)
func DeleteCatalogSourceStateMetric ¶ added in v0.18.2
func DeleteCatalogSourceStateMetric(name, namespace string)
func DeleteSubsMetric ¶
func DeleteSubsMetric(sub *olmv1alpha1.Subscription)
func EmitCSVMetric ¶
func EmitCSVMetric(oldCSV *olmv1alpha1.ClusterServiceVersion, newCSV *olmv1alpha1.ClusterServiceVersion)
func EmitInstallPlanWarning ¶ added in v0.18.2
func EmitInstallPlanWarning()
func EmitSubMetric ¶
func EmitSubMetric(sub *olmv1alpha1.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 *olmv1alpha1.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.