Documentation ¶
Index ¶
- func CreateValidMetricNameLabel(prefix, name string) string
- func GetOwnerReference(app *v1beta2.SparkApplication) metav1.OwnerReference
- 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 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.SummaryMetric
- func (p *WorkQueueMetrics) NewLongestRunningProcessorMicrosecondsMetric(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.SummaryMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOwnerReference ¶
func GetOwnerReference(app *v1beta2.SparkApplication) metav1.OwnerReference
GetOwnerReference returns an OwnerReference pointing to the given app.
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 MetricConfig ¶
type MetricConfig struct { MetricsEndpoint string MetricsPort string MetricsPrefix string MetricsLabels []string }
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.SummaryMetric
Latency Metric for the kubernetes workqueue.
func (*WorkQueueMetrics) NewLongestRunningProcessorMicrosecondsMetric ¶
func (p *WorkQueueMetrics) NewLongestRunningProcessorMicrosecondsMetric(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.SummaryMetric
WorkDuration Metric for the kubernetes workqueue.