Documentation ¶
Index ¶
- Constants
- Variables
- func AddMetricsTransportWrapper(config *rest.Config) *rest.Config
- func ConstructOrUpdateMetric(metric prometheus.Metric, metricSpec *wfv1.Prometheus) (prometheus.Metric, error)
- func ConstructRealTimeGaugeMetric(metricSpec *wfv1.Prometheus, valueFunc func() float64) (prometheus.Metric, error)
- func IsValidMetricName(name string) bool
- func ValidateMetricLabels(metrics map[string]string) error
- type ErrorCause
- type Metrics
- func (m *Metrics) Collect(ch chan<- prometheus.Metric)
- func (m *Metrics) CronWorkflowSubmissionError()
- func (m *Metrics) Describe(ch chan<- *prometheus.Desc)
- func (m *Metrics) Fire(entry *log.Entry) error
- func (m *Metrics) GetCustomMetric(key string) prometheus.Metric
- func (m *Metrics) Levels() []log.Level
- func (m *Metrics) NewAddsMetric(name string) workqueue.CounterMetric
- func (m *Metrics) NewDepthMetric(name string) workqueue.GaugeMetric
- func (m *Metrics) NewLatencyMetric(name string) workqueue.HistogramMetric
- func (m *Metrics) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric
- func (m *Metrics) NewRetriesMetric(name string) workqueue.CounterMetric
- func (m *Metrics) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric
- func (m *Metrics) NewWorkDurationMetric(name string) workqueue.HistogramMetric
- func (m *Metrics) OperationCompleted(durationSeconds float64)
- func (m *Metrics) OperationPanic()
- func (m *Metrics) RateLimiterWithBusyWorkers(workQueue workqueue.RateLimiter, queueName string) workqueue.RateLimitingInterface
- func (m *Metrics) RunServer(ctx context.Context)
- func (m *Metrics) SetPodPhaseGauge(phase corev1.PodPhase, num int)
- func (m *Metrics) SetWorkflowPhaseGauge(phase v1alpha1.NodePhase, num int)
- func (m *Metrics) StopRealtimeMetricsForKey(key string)
- func (m *Metrics) UpsertCustomMetric(key string, ownerKey string, newMetric prometheus.Metric, realtime bool) error
- type RealTimeMetric
- type ServerConfig
Constants ¶
View Source
const ( DefaultMetricsServerPort = 9090 DefaultMetricsServerPath = "/metrics" )
Variables ¶
View Source
var K8sRequestTotalMetric = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: argoNamespace, Subsystem: workflowsSubsystem, Name: "k8s_request_total", Help: "Number of kubernetes requests executed. https://argoproj.github.io/argo-workflows/metrics/#argo_workflows_k8s_request_total", }, []string{"kind", "verb", "status_code"}, )
View Source
var PodMissingMetric = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: argoNamespace, Name: "pod_missing", Help: "Incidents of pod missing. https://argoproj.github.io/argo-workflows/metrics/#argo_pod_missing", }, []string{"recently_started", "node_phase"}, )
View Source
var WorkflowConditionMetric = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: argoNamespace, Subsystem: workflowsSubsystem, Name: "workflow_condition", Help: "Workflow condition. https://argoproj.github.io/argo-workflows/metrics/#argo_workflows_workflow_condition", }, []string{"type", "status"}, )
Functions ¶
func ConstructOrUpdateMetric ¶
func ConstructOrUpdateMetric(metric prometheus.Metric, metricSpec *wfv1.Prometheus) (prometheus.Metric, error)
func ConstructRealTimeGaugeMetric ¶
func ConstructRealTimeGaugeMetric(metricSpec *wfv1.Prometheus, valueFunc func() float64) (prometheus.Metric, error)
func IsValidMetricName ¶
func ValidateMetricLabels ¶
Types ¶
type ErrorCause ¶
type ErrorCause string
const ( ErrorCauseOperationPanic ErrorCause = "OperationPanic" ErrorCauseCronWorkflowSubmissionError ErrorCause = "CronWorkflowSubmissionError" )
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func New ¶
func New(metricsConfig, telemetryConfig ServerConfig) *Metrics
func (*Metrics) Collect ¶
func (m *Metrics) Collect(ch chan<- prometheus.Metric)
func (*Metrics) CronWorkflowSubmissionError ¶
func (m *Metrics) CronWorkflowSubmissionError()
func (*Metrics) Describe ¶
func (m *Metrics) Describe(ch chan<- *prometheus.Desc)
func (*Metrics) GetCustomMetric ¶
func (m *Metrics) GetCustomMetric(key string) prometheus.Metric
func (*Metrics) NewAddsMetric ¶
func (m *Metrics) NewAddsMetric(name string) workqueue.CounterMetric
func (*Metrics) NewDepthMetric ¶
func (m *Metrics) NewDepthMetric(name string) workqueue.GaugeMetric
func (*Metrics) NewLatencyMetric ¶
func (m *Metrics) NewLatencyMetric(name string) workqueue.HistogramMetric
func (*Metrics) NewLongestRunningProcessorSecondsMetric ¶
func (m *Metrics) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric
func (*Metrics) NewRetriesMetric ¶
func (m *Metrics) NewRetriesMetric(name string) workqueue.CounterMetric
func (*Metrics) NewUnfinishedWorkSecondsMetric ¶
func (m *Metrics) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric
func (*Metrics) NewWorkDurationMetric ¶
func (m *Metrics) NewWorkDurationMetric(name string) workqueue.HistogramMetric
func (*Metrics) OperationCompleted ¶
func (*Metrics) OperationPanic ¶
func (m *Metrics) OperationPanic()
func (*Metrics) RateLimiterWithBusyWorkers ¶
func (m *Metrics) RateLimiterWithBusyWorkers(workQueue workqueue.RateLimiter, queueName string) workqueue.RateLimitingInterface
func (*Metrics) SetPodPhaseGauge ¶
func (*Metrics) SetWorkflowPhaseGauge ¶
func (*Metrics) StopRealtimeMetricsForKey ¶
func (*Metrics) UpsertCustomMetric ¶
type RealTimeMetric ¶
type RealTimeMetric struct {
Func func() float64
}
type ServerConfig ¶
func (ServerConfig) SameServerAs ¶
func (s ServerConfig) SameServerAs(other ServerConfig) bool
Click to show internal directories.
Click to hide internal directories.