File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ func NewProcessCollectorPIDFn(
81
81
}
82
82
83
83
// Set up process metric collection if supported by the runtime.
84
- if processCollectSupported () {
84
+ if _ , err := procfs . NewStat (); err == nil {
85
85
c .collectFn = c .processCollect
86
86
}
87
87
@@ -103,13 +103,6 @@ func (c *processCollector) Collect(ch chan<- Metric) {
103
103
c .collectFn (ch )
104
104
}
105
105
106
- func processCollectSupported () bool {
107
- if _ , err := procfs .NewStat (); err == nil {
108
- return true
109
- }
110
- return false
111
- }
112
-
113
106
// TODO(ts): Bring back error reporting by reverting 7faf9e7 as soon as the
114
107
// client allows users to configure the error behavior.
115
108
func (c * processCollector ) processCollect (ch chan <- Metric ) {
You can’t perform that action at this time.
0 commit comments