system: remove windows_system_boot_time_timestamp_seconds (#2112)

This commit is contained in:
Jan-Otto Kröpke
2025-07-05 15:40:09 +02:00
committed by GitHub
parent f8805932b2
commit ed15b3c671
4 changed files with 2 additions and 34 deletions

View File

@@ -52,10 +52,8 @@ type Collector struct {
processes *prometheus.Desc
processesLimit *prometheus.Desc
systemCallsTotal *prometheus.Desc
// Deprecated: Use windows_system_boot_time_timestamp instead
bootTimeSeconds *prometheus.Desc
bootTime *prometheus.Desc
threads *prometheus.Desc
bootTime *prometheus.Desc
threads *prometheus.Desc
}
func New(config *Config) *Collector {
@@ -91,12 +89,6 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
nil,
nil,
)
c.bootTimeSeconds = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "boot_time_timestamp_seconds"),
"Deprecated: Use windows_system_boot_time_timestamp instead",
nil,
nil,
)
c.contextSwitchesTotal = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "context_switches_total"),
"Total number of context switches (WMI source: PerfOS_System.ContextSwitchesPersec)",
@@ -199,12 +191,6 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
c.perfDataObject[0].Threads,
)
ch <- prometheus.MustNewConstMetric(
c.bootTimeSeconds,
prometheus.GaugeValue,
c.bootTimeTimestamp,
)
ch <- prometheus.MustNewConstMetric(
c.bootTime,
prometheus.GaugeValue,