Documentation ¶
Index ¶
- Variables
- func CreateValidMetricNameLabel(prefix, name string) string
- func GetOwnerReference(app *v1beta2.SparkApplication) metav1.OwnerReference
- func InitializeIngressCapabilities(client kubernetes.Interface) (err error)
- func InitializeMetrics(metricsConfig *MetricConfig)
- func IsDriverPod(pod *apiv1.Pod) bool
- func IsExecutorPod(pod *apiv1.Pod) bool
- func IsLaunchedBySparkOperator(pod *apiv1.Pod) bool
- func NewHash32() hash.Hash32
- func RegisterMetric(metric prometheus.Collector)
- type ArrayFlags
- type Capabilities
- type HistogramBuckets
- type MetricConfig
- type PositiveGauge
- type WorkQueueMetrics
- func (p *WorkQueueMetrics) NewAddsMetric(name string) workqueue.CounterMetric
- func (p *WorkQueueMetrics) NewDepthMetric(name string) workqueue.GaugeMetric
- func (p *WorkQueueMetrics) NewLatencyMetric(name string) workqueue.HistogramMetric
- func (p *WorkQueueMetrics) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric
- func (p *WorkQueueMetrics) NewRetriesMetric(name string) workqueue.CounterMetric
- func (p *WorkQueueMetrics) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric
- func (p *WorkQueueMetrics) NewWorkDurationMetric(name string) workqueue.HistogramMetric
Constants ¶
This section is empty.
Variables ¶
var DefaultJobStartLatencyBuckets = []float64{30, 60, 90, 120, 150, 180, 210, 240, 270, 300}
Functions ¶
func GetOwnerReference ¶
func GetOwnerReference(app *v1beta2.SparkApplication) metav1.OwnerReference
GetOwnerReference returns an OwnerReference pointing to the given app.
func InitializeIngressCapabilities ¶
func InitializeIngressCapabilities(client kubernetes.Interface) (err error)
func InitializeMetrics ¶
func InitializeMetrics(metricsConfig *MetricConfig)
func IsDriverPod ¶
IsDriverPod returns whether the given pod is a Spark driver Pod.
func IsExecutorPod ¶
IsExecutorPod returns whether the given pod is a Spark executor Pod.
func IsLaunchedBySparkOperator ¶
IsLaunchedBySparkOperator returns whether the given pod is launched by the Spark Operator.
func RegisterMetric ¶
func RegisterMetric(metric prometheus.Collector)
Best effort metric registration with Prometheus.
Types ¶
type ArrayFlags ¶
type ArrayFlags []string
func (*ArrayFlags) Set ¶
func (a *ArrayFlags) Set(value string) error
func (*ArrayFlags) String ¶
func (a *ArrayFlags) String() string
type Capabilities ¶
var (
IngressCapabilities Capabilities
)
func (Capabilities) Has ¶
func (c Capabilities) Has(wanted string) bool
func (Capabilities) String ¶
func (c Capabilities) String() string
type HistogramBuckets ¶
type HistogramBuckets []float64
func (*HistogramBuckets) Set ¶
func (hb *HistogramBuckets) Set(value string) error
func (*HistogramBuckets) String ¶
func (hb *HistogramBuckets) String() string
type MetricConfig ¶
type MetricConfig struct { MetricsEndpoint string MetricsPort string MetricsPrefix string MetricsLabels []string MetricsJobStartLatencyBuckets []float64 }
MetricConfig is a container of configuration properties for the collection and exporting of application metrics to Prometheus.
type PositiveGauge ¶
type PositiveGauge struct {
// contains filtered or unexported fields
}
A variant of Prometheus Gauge that only holds non-negative values.
func NewPositiveGauge ¶
func NewPositiveGauge(name string, description string, labels []string) *PositiveGauge
func (*PositiveGauge) Dec ¶
func (p *PositiveGauge) Dec(labelMap map[string]string)
Decrement the metric only if its positive for the labels specified
func (*PositiveGauge) Inc ¶
func (p *PositiveGauge) Inc(labelMap map[string]string)
Increment the Metric for the labels specified
func (*PositiveGauge) Register ¶
func (p *PositiveGauge) Register()
type WorkQueueMetrics ¶
type WorkQueueMetrics struct {
// contains filtered or unexported fields
}
func (*WorkQueueMetrics) NewAddsMetric ¶
func (p *WorkQueueMetrics) NewAddsMetric(name string) workqueue.CounterMetric
Adds Count Metrics for the kubernetes workqueue.
func (*WorkQueueMetrics) NewDepthMetric ¶
func (p *WorkQueueMetrics) NewDepthMetric(name string) workqueue.GaugeMetric
Depth Metric for the kubernetes workqueue.
func (*WorkQueueMetrics) NewLatencyMetric ¶
func (p *WorkQueueMetrics) NewLatencyMetric(name string) workqueue.HistogramMetric
Latency Metric for the kubernetes workqueue.
func (*WorkQueueMetrics) NewLongestRunningProcessorSecondsMetric ¶
func (p *WorkQueueMetrics) NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric
func (*WorkQueueMetrics) NewRetriesMetric ¶
func (p *WorkQueueMetrics) NewRetriesMetric(name string) workqueue.CounterMetric
Retry Metric for the kubernetes workqueue.
func (*WorkQueueMetrics) NewUnfinishedWorkSecondsMetric ¶
func (p *WorkQueueMetrics) NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric
func (*WorkQueueMetrics) NewWorkDurationMetric ¶
func (p *WorkQueueMetrics) NewWorkDurationMetric(name string) workqueue.HistogramMetric
WorkDuration Metric for the kubernetes workqueue.