Documentation
¶
Index ¶
- Constants
- Variables
- func CounterForSubscription(name, installedCSV, channelName, packageName string) prometheus.Counter
- func EmitCSVMetric(oldCSV *olmv1alpha1.ClusterServiceVersion, ...)
- func RegisterCatalog()
- func RegisterOLM()
- type MetricsNil
- type MetricsProvider
- func NewMetricsCSV(lister v1alpha1.ClusterServiceVersionLister) MetricsProvider
- func NewMetricsCatalogSource(client versioned.Interface) MetricsProvider
- func NewMetricsInstallPlan(client versioned.Interface) MetricsProvider
- func NewMetricsNil() MetricsProvider
- func NewMetricsSubscription(client versioned.Interface) 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" )
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}, ) )
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 string) prometheus.Counter
func EmitCSVMetric ¶
func EmitCSVMetric(oldCSV *olmv1alpha1.ClusterServiceVersion, newCSV *olmv1alpha1.ClusterServiceVersion)
func RegisterCatalog ¶
func RegisterCatalog()
func RegisterOLM ¶
func RegisterOLM()
Types ¶
type MetricsNil ¶
type MetricsNil struct{}
func (*MetricsNil) HandleMetrics ¶
func (*MetricsNil) HandleMetrics() error
type MetricsProvider ¶
type MetricsProvider interface {
HandleMetrics() error
}
TODO(alecmerdler): Can we use this to emit Kubernetes events?
func NewMetricsCSV ¶
func NewMetricsCSV(lister v1alpha1.ClusterServiceVersionLister) MetricsProvider
func NewMetricsCatalogSource ¶
func NewMetricsCatalogSource(client versioned.Interface) MetricsProvider
func NewMetricsInstallPlan ¶
func NewMetricsInstallPlan(client versioned.Interface) MetricsProvider
func NewMetricsNil ¶
func NewMetricsNil() MetricsProvider
func NewMetricsSubscription ¶
func NewMetricsSubscription(client versioned.Interface) MetricsProvider
Click to show internal directories.
Click to hide internal directories.