Documentation ¶
Index ¶
- Constants
- func AddMetricsTransportWrapper(server *MetricsServer, app *v1alpha1.Application, config *rest.Config) *rest.Config
- func NewAppCollector(appLister applister.ApplicationLister) prometheus.Collector
- func NewAppRegistry(appLister applister.ApplicationLister) *prometheus.Registry
- type MetricsServer
Constants ¶
View Source
const (
// MetricsPath is the endpoint to collect application metrics
MetricsPath = "/metrics"
)
Variables ¶
This section is empty.
Functions ¶
func AddMetricsTransportWrapper ¶
func AddMetricsTransportWrapper(server *MetricsServer, app *v1alpha1.Application, config *rest.Config) *rest.Config
AddMetricsTransportWrapper adds a transport wrapper which increments 'argocd_app_k8s_request_total' counter on each kubernetes request
func NewAppCollector ¶
func NewAppCollector(appLister applister.ApplicationLister) prometheus.Collector
NewAppCollector returns a prometheus collector for application metrics
func NewAppRegistry ¶
func NewAppRegistry(appLister applister.ApplicationLister) *prometheus.Registry
NewAppRegistry creates a new prometheus registry that collects applications
Types ¶
type MetricsServer ¶
func NewMetricsServer ¶
func NewMetricsServer(addr string, appLister applister.ApplicationLister, healthCheck func() error) *MetricsServer
NewMetricsServer returns a new prometheus server which collects application metrics
func (*MetricsServer) IncKubernetesRequest ¶
func (m *MetricsServer) IncKubernetesRequest(app *argoappv1.Application, statusCode int)
IncKubernetesRequest increments the kubernetes requests counter for an application
func (*MetricsServer) IncReconcile ¶
func (m *MetricsServer) IncReconcile(app *argoappv1.Application, duration time.Duration)
IncReconcile increments the reconcile counter for an application
func (*MetricsServer) IncSync ¶
func (m *MetricsServer) IncSync(app *argoappv1.Application, state *argoappv1.OperationState)
IncSync increments the sync counter for an application
Click to show internal directories.
Click to hide internal directories.