metrics

package
v2.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

func IsValidMetricName(name string) bool

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) Fire

func (m *Metrics) Fire(entry *log.Entry) error

func (*Metrics) GetCustomMetric

func (m *Metrics) GetCustomMetric(key string) prometheus.Metric

func (*Metrics) Levels

func (m *Metrics) Levels() []log.Level

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 (m *Metrics) OperationCompleted(durationSeconds float64)

func (*Metrics) OperationPanic

func (m *Metrics) OperationPanic()

func (*Metrics) RunServer

func (m *Metrics) RunServer(ctx context.Context)

RunServer starts a metrics server

func (*Metrics) UpsertCustomMetric

func (m *Metrics) UpsertCustomMetric(key string, newMetric prometheus.Metric) error

func (*Metrics) WorkflowAdded

func (m *Metrics) WorkflowAdded(key string, phase v1alpha1.NodePhase)

func (*Metrics) WorkflowDeleted

func (m *Metrics) WorkflowDeleted(key string, phase v1alpha1.NodePhase)

func (*Metrics) WorkflowUpdated

func (m *Metrics) WorkflowUpdated(key string, fromPhase, toPhase v1alpha1.NodePhase)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL