Skip to content

Commit 2664536

Browse files
authored
Merge pull request #2114 from prometheus/superq/cut_1.2.2
Release 1.2.2
2 parents 4200d7f + b23280e commit 2664536

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* [ENHANCEMENT]
66
* [BUGFIX]
77

8+
## 1.2.2 / 2021-08-06
9+
10+
* [BUGFIX] Fix processes collector long int parsing #2112
11+
812
## 1.2.1 / 2021-07-23
913

1014
* [BUGFIX] Fix zoneinfo parsing prometheus/procfs#386

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.1
1+
1.2.2

collector/processes_linux.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (c *processCollector) Update(ch chan<- prometheus.Metric) error {
105105
func (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, error) {
106106
p, err := c.fs.AllProcs()
107107
if err != nil {
108-
return 0, nil, 0, err
108+
return 0, nil, 0, fmt.Errorf("unable to list all processes: %w", err)
109109
}
110110
pids := 0
111111
thread := 0
@@ -118,8 +118,8 @@ func (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, er
118118
level.Debug(c.logger).Log("msg", "file not found when retrieving stats for pid", "pid", pid, "err", err)
119119
continue
120120
}
121-
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid, "err", err)
122-
return 0, nil, 0, err
121+
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid.PID, "err", err)
122+
return 0, nil, 0, fmt.Errorf("error reading stat for pid %d: %w", pid.PID, err)
123123
}
124124
pids++
125125
procStates[stat.State]++

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/prometheus/client_model v0.2.0
1717
github.com/prometheus/common v0.29.0
1818
github.com/prometheus/exporter-toolkit v0.6.0
19-
github.com/prometheus/procfs v0.7.1
19+
github.com/prometheus/procfs v0.7.2
2020
github.com/safchain/ethtool v0.0.0-20201023143004-874930cb3ce0
2121
github.com/siebenmann/go-kstat v0.0.0-20210513183136-173c9b0a9973 // indirect
2222
github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
238238
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
239239
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
240240
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
241-
github.com/prometheus/procfs v0.7.1 h1:TlEtJq5GvGqMykEwWzbZWjjztF86swFhsPix1i0bkgA=
242-
github.com/prometheus/procfs v0.7.1/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
241+
github.com/prometheus/procfs v0.7.2 h1:zE6zJjRS9S916ptrZ326OU0++1XRwHgxkvCFflxx6Fo=
242+
github.com/prometheus/procfs v0.7.2/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
243243
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
244244
github.com/safchain/ethtool v0.0.0-20201023143004-874930cb3ce0 h1:eskphjc5kRCykOJyX7HHVbJCs25/8knprttvrVvEd8o=
245245
github.com/safchain/ethtool v0.0.0-20201023143004-874930cb3ce0/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=

0 commit comments

Comments
 (0)