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

@@ -81,8 +81,6 @@ type Collector struct {
poolBytes *prometheus.Desc
priorityBase *prometheus.Desc
privateBytes *prometheus.Desc
// Deprecated: Use start_time_seconds_timestamp instead
startTimeOld *prometheus.Desc
startTime *prometheus.Desc
threadCount *prometheus.Desc
virtualBytes *prometheus.Desc
@@ -221,13 +219,6 @@ func (c *Collector) Build(logger *slog.Logger, miSession *mi.Session) error {
nil,
)
c.startTimeOld = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "start_time"),
"DEPRECATED: Use start_time_seconds_timestamp instead",
[]string{"process", "process_id"},
nil,
)
c.startTime = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "start_time_seconds_timestamp"),
"Time of process start.",

View File

@@ -146,13 +146,6 @@ func (c *Collector) collectWorker() {
startTime := float64(time.Now().UnixMicro())/1e6 - data.ElapsedTime
ch <- prometheus.MustNewConstMetric(
c.startTimeOld,
prometheus.GaugeValue,
startTime,
name, pidString,
)
ch <- prometheus.MustNewConstMetric(
c.startTime,
prometheus.GaugeValue,

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,