process: negative values with windows_process_start_time (#1857)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2025-01-30 20:30:08 +01:00
committed by GitHub
parent 8bff623393
commit 71ec0bd6a3
4 changed files with 29 additions and 3 deletions

View File

@@ -76,6 +76,8 @@ 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
@@ -214,8 +216,15 @@ func (c *Collector) Build(logger *slog.Logger, miSession *mi.Session) error {
nil,
)
c.startTime = prometheus.NewDesc(
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.",
[]string{"process", "process_id"},
nil,