metrics

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrueValue  = 1.0
	FalseValue = 0.0
)
View Source
const (
	// UntaintTimeoutReasonReadiness signals that a pod existed on the node but
	// never became Ready within --untaintControllerTimeout.
	UntaintTimeoutReasonReadiness = "readiness"
	// UntaintTimeoutReasonScheduling signals that no agent pod was scheduled on
	// the node within --untaintControllerSchedulingTimeout.
	UntaintTimeoutReasonScheduling = "scheduling"

	// UntaintTimeoutPolicyRemove untaints the node despite the agent not being ready.
	UntaintTimeoutPolicyRemove = "remove"
	// UntaintTimeoutPolicyKeep leaves the taint in place but emits observability signals.
	UntaintTimeoutPolicyKeep = "keep"
)

Label values for TaintTimeoutsTotal.

Variables

View Source
var (
	// datadogagentprofile enabled
	DAPEnabled = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Subsystem: datadogAgentProfileSubsystem,
			Name:      "enabled",
			Help:      "1 if DatadogAgentProfiles are enabled. 0 if DatadogAgentProfiles are disabled",
		},
	)

	// datadogagentprofile valid
	DAPValid = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Subsystem: datadogAgentProfileSubsystem,
			Name:      "valid",
			Help:      "1 if the DatadogAgentProfile is valid. 0 if the DatadogAgentProfile is invalid",
		},
		[]string{
			datadogAgentProfileLabelKey,
		},
	)
)
View Source
var (
	// TaintRemovalsTotal is the total number of taints removed from nodes.
	TaintRemovalsTotal = prometheus.NewCounter(
		prometheus.CounterOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_removals_total",
			Help:      "Total number of taints removed from nodes",
		},
	)

	// TaintRemovalLatency is the time between agent pod becoming Ready and taint removal.
	TaintRemovalLatency = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_removal_latency_seconds",
			Help:      "Time between agent pod becoming Ready and taint removal from the node",
			Buckets:   prometheus.DefBuckets,
		},
	)

	// TaintTimeoutsTotal counts timeout decisions broken down by reason and policy.
	TaintTimeoutsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_timeouts_total",
			Help:      "Total number of untaint-controller timeout decisions, by reason and policy",
		},
		[]string{"reason", "policy"},
	)

	// TaintRemovalErrorsTotal counts hard errors encountered while attempting to
	// remove the taint (apiserver Patch failures, JSON marshal failures, …).
	// Benign optimistic-concurrency races (IsConflict/IsInvalid) are NOT counted
	// here — they're handled by requeueing. Inspect the operator's ERROR-level
	// logs for the specific failure cause.
	TaintRemovalErrorsTotal = prometheus.NewCounter(
		prometheus.CounterOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_removal_errors_total",
			Help:      "Total number of errors encountered while attempting to remove the agent-not-ready taint from a node",
		},
	)
)
View Source
var (
	// introspection enabled
	IntrospectionEnabled = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Subsystem: datadogAgentSubsystem,
			Name:      "introspection_enabled",
			Help:      "1 if introspection is enabled. 0 if introspection is disabled",
		},
	)
)
View Source
var (
	// maximum goroutines
	MaxGoroutines = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "max_goroutines",
			Help: "reports the maximum number of goroutines set in the datadog operator",
		},
	)
)

Functions

func CleanupMetricsByProfile

func CleanupMetricsByProfile(obj client.Object)

CleanupMetricsByProfile deletes profile-specific prometheus metrics given a profile

Types

This section is empty.

Jump to

Keyboard shortcuts

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