Documentation ¶
Index ¶
- Constants
- 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
- 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) RunServer(ctx context.Context)
- func (m *Metrics) UpsertCustomMetric(key string, newMetric prometheus.Metric) error
- func (m *Metrics) WorkflowAdded(key string, phase v1alpha1.NodePhase)
- func (m *Metrics) WorkflowDeleted(key string, phase v1alpha1.NodePhase)
- func (m *Metrics) WorkflowUpdated(key string, fromPhase, toPhase v1alpha1.NodePhase)
- type RealTimeMetric
- type ServerConfig
Constants ¶
View Source
const ( DefaultMetricsServerPort = "9090" DefaultMetricsServerPath = "/metrics" )
Variables ¶
This section is empty.
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 ¶
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) UpsertCustomMetric ¶
func (m *Metrics) UpsertCustomMetric(key string, newMetric prometheus.Metric) error
func (*Metrics) WorkflowAdded ¶
func (*Metrics) WorkflowDeleted ¶
type RealTimeMetric ¶
type RealTimeMetric struct {
Func func() float64
}
type ServerConfig ¶
type ServerConfig struct { Enabled bool Path string Port string TTL time.Duration IgnoreErrors bool }
func (ServerConfig) SameServerAs ¶
func (s ServerConfig) SameServerAs(other ServerConfig) bool
Click to show internal directories.
Click to hide internal directories.