metrics

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"

	// UntaintRemovalReasonAgentReady signals the taint was removed because the
	// readiness criteria were met (agent — and optionally CSI — pods Ready).
	UntaintRemovalReasonAgentReady = "agent_ready"
	// UntaintRemovalReasonTimeout signals the taint was removed because a
	// readiness or scheduling timeout fired under policy=remove.
	UntaintRemovalReasonTimeout = "timeout"
)

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,
	// broken down by node and removal reason (agent_ready or timeout).
	TaintRemovalsTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_removals_total",
			Help:      "Total number of taints removed from nodes, by node and reason",
		},
		[]string{untaintNodeLabel, "reason"},
	)

	// TaintRemovalLatency is the time between agent pod becoming Ready and taint
	// removal, broken down by node.
	TaintRemovalLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: untaintSubsystem,
			Name:      "taint_removal_latency_seconds",
			Help:      "Time between agent pod becoming Ready and taint removal from the node, by node",
			Buckets:   prometheus.DefBuckets,
		},
		[]string{untaintNodeLabel},
	)

	// 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

func DeleteNodeSeries added in v1.29.0

func DeleteNodeSeries(node string)

DeleteNodeSeries removes every child series labeled with the given node from the node-scoped untaint metrics: TaintRemovalsTotal (across all reason values) and TaintRemovalLatency (across all histogram buckets). It is a no-op when the node has no series. Call it when a node is deleted to prevent unbounded growth of per-node series for the operator's lifetime as clusters autoscale or replace nodes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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