Skip to content

Commit 8d0ca3d

Browse files
atoulmemx-psi
andauthored
[receiver/hostmetrics] make sure process scraper uses root_path config entry (#26479)
**Description:** A regression introduced in 0.82.0 means that the process scraper doesn't properly respect the `root_path` configuration key when it comes to reading process information. **Link to tracking Issue:** Fixes #24777 --------- Co-authored-by: Pablo Baeyens <[email protected]>
1 parent cef9caa commit 8d0ca3d

16 files changed

+680
-172
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: receiver/hostmetricsreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Make sure the process scraper uses the gopsutil context, respecting the `root_path` configuration.
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [24777]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: "This regression was introduced by #24777"
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]

receiver/hostmetricsreceiver/go.mod

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ go 1.20
55
require (
66
github.com/google/go-cmp v0.5.9
77
github.com/leoluk/perflib_exporter v0.2.1
8+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.85.0
89
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.85.0
10+
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.85.0
911
github.com/shirou/gopsutil/v3 v3.23.8
1012
github.com/stretchr/testify v1.8.4
1113
github.com/yusufpapurcu/wmi v1.2.3
@@ -23,10 +25,19 @@ require (
2325

2426
require (
2527
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
28+
dario.cat/mergo v1.0.0 // indirect
29+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
30+
github.com/Microsoft/go-winio v0.6.1 // indirect
2631
github.com/beorn7/perks v1.0.1 // indirect
2732
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
2833
github.com/cespare/xxhash/v2 v2.2.0 // indirect
34+
github.com/containerd/containerd v1.7.3 // indirect
35+
github.com/cpuguy83/dockercfg v0.3.1 // indirect
2936
github.com/davecgh/go-spew v1.1.1 // indirect
37+
github.com/docker/distribution v2.8.2+incompatible // indirect
38+
github.com/docker/docker v24.0.6+incompatible // indirect
39+
github.com/docker/go-connections v0.4.0 // indirect
40+
github.com/docker/go-units v0.5.0 // indirect
3041
github.com/go-kit/log v0.2.1 // indirect
3142
github.com/go-logfmt/logfmt v0.5.1 // indirect
3243
github.com/go-logr/logr v1.2.4 // indirect
@@ -39,15 +50,26 @@ require (
3950
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
4051
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4152
github.com/json-iterator/go v1.1.12 // indirect
53+
github.com/klauspost/compress v1.17.0 // indirect
4254
github.com/knadh/koanf v1.5.0 // indirect
4355
github.com/knadh/koanf/v2 v2.0.1 // indirect
4456
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
57+
github.com/magiconair/properties v1.8.7 // indirect
4558
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
4659
github.com/mitchellh/copystructure v1.2.0 // indirect
4760
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
4861
github.com/mitchellh/reflectwalk v1.0.2 // indirect
62+
github.com/moby/patternmatcher v0.5.0 // indirect
63+
github.com/moby/sys/sequential v0.5.0 // indirect
64+
github.com/moby/term v0.5.0 // indirect
4965
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5066
github.com/modern-go/reflect2 v1.0.2 // indirect
67+
github.com/morikuni/aec v1.0.0 // indirect
68+
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.85.0 // indirect
69+
github.com/opencontainers/go-digest v1.0.0 // indirect
70+
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
71+
github.com/opencontainers/runc v1.1.5 // indirect
72+
github.com/pkg/errors v0.9.1 // indirect
5173
github.com/pmezard/go-difflib v1.0.0 // indirect
5274
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
5375
github.com/prometheus/client_golang v1.16.0 // indirect
@@ -56,9 +78,11 @@ require (
5678
github.com/prometheus/procfs v0.10.1 // indirect
5779
github.com/prometheus/statsd_exporter v0.22.7 // indirect
5880
github.com/shoenig/go-m1cpu v0.1.6 // indirect
81+
github.com/sirupsen/logrus v1.9.0 // indirect
5982
github.com/spf13/cobra v1.7.0 // indirect
6083
github.com/spf13/pflag v1.0.5 // indirect
6184
github.com/stretchr/objx v0.5.0 // indirect
85+
github.com/testcontainers/testcontainers-go v0.23.0 // indirect
6286
github.com/tklauser/go-sysconf v0.3.12 // indirect
6387
github.com/tklauser/numcpus v0.6.1 // indirect
6488
go.opencensus.io v0.24.0 // indirect
@@ -87,8 +111,11 @@ require (
87111
go.opentelemetry.io/otel/sdk/metric v0.41.0 // indirect
88112
go.opentelemetry.io/otel/trace v1.18.0 // indirect
89113
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
114+
golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 // indirect
115+
golang.org/x/mod v0.12.0 // indirect
90116
golang.org/x/net v0.15.0 // indirect
91117
golang.org/x/text v0.13.0 // indirect
118+
golang.org/x/tools v0.13.0 // indirect
92119
gonum.org/v1/gonum v0.14.0 // indirect
93120
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
94121
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect

0 commit comments

Comments
 (0)