diff --git a/NOTICE.txt b/NOTICE.txt index cf081d6a4dc..7ec89254682 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1490,11 +1490,19 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-system-metrics +<<<<<<< HEAD Version: v0.10.4 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.10.4/LICENSE.txt: +======= +Version: v0.11.0 +Licence type (autodetected): Apache-2.0 +-------------------------------------------------------------------------------- + +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.11.0/LICENSE.txt: +>>>>>>> a1fd2c9d9a ([pkg][fix] - Filter non-fatal errors and update go.mod (#5196)) Apache License Version 2.0, January 2004 diff --git a/go.mod b/go.mod index a64475f8208..6635d09e4b1 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,11 @@ require ( github.com/elastic/elastic-agent-autodiscover v0.8.1 github.com/elastic/elastic-agent-client/v7 v7.14.0 github.com/elastic/elastic-agent-libs v0.9.15 +<<<<<<< HEAD github.com/elastic/elastic-agent-system-metrics v0.10.4 +======= + github.com/elastic/elastic-agent-system-metrics v0.11.0 +>>>>>>> a1fd2c9d9a ([pkg][fix] - Filter non-fatal errors and update go.mod (#5196)) github.com/elastic/elastic-transport-go/v8 v8.6.0 github.com/elastic/go-elasticsearch/v8 v8.14.0 github.com/elastic/go-licenser v0.4.2 diff --git a/go.sum b/go.sum index e959fee5ea6..f48a923ed71 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,13 @@ github.com/elastic/elastic-agent-client/v7 v7.14.0 h1:X6S2RyjZNKsDCvA2igch2I5dgH github.com/elastic/elastic-agent-client/v7 v7.14.0/go.mod h1:6h+f9QdIr3GO2ODC0Y8+aEXRwzbA5W4eV4dd/67z7nI= github.com/elastic/elastic-agent-libs v0.9.15 h1:WCLtuErafUxczT/rXJa4Vr6mxwC8dgtqMbEq+qWGD4M= github.com/elastic/elastic-agent-libs v0.9.15/go.mod h1:2VgYxHaeM+cCDBjiS2wbmTvzPGbnlXAtYrlcLefheS8= +<<<<<<< HEAD github.com/elastic/elastic-agent-system-metrics v0.10.4 h1:Tmb1rPRDyVv9M453YlPyl/gwUm9s4nSiI2xH76GGEz4= github.com/elastic/elastic-agent-system-metrics v0.10.4/go.mod h1:cd7YgcTEjBNeLGnH/C9cEvP/YexohwS6CpmN9Ju58Mw= +======= +github.com/elastic/elastic-agent-system-metrics v0.11.0 h1:/bWrgTsHZWLUhdT7WPNuQDFkrSfm+A4qf6QDQnZo9d8= +github.com/elastic/elastic-agent-system-metrics v0.11.0/go.mod h1:3QiMu9wTKJFvpCN+5klgGqasTMNKJbgY3xcoN1KQXJk= +>>>>>>> a1fd2c9d9a ([pkg][fix] - Filter non-fatal errors and update go.mod (#5196)) github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/go-docappender/v2 v2.2.0 h1:Pq6w+R0ZbWlqZHoqzoujR2ElKBfaPUf3M/cJvPVSrfA= diff --git a/pkg/testing/fixture_install.go b/pkg/testing/fixture_install.go index 029dafb3bb1..10e753eb27d 100644 --- a/pkg/testing/fixture_install.go +++ b/pkg/testing/fixture_install.go @@ -379,7 +379,7 @@ func getProcesses(t *gotesting.T, regex string) []runningProcess { } _, pids, err := procStats.FetchPids() - if !assert.NoError(t, err, "error fetching process information") { + if err != nil && assert.Truef(t, errors.Is(err, agentsystemprocess.NonFatalErr{}), "error fetching process information: %v", err) { // we failed a bit further return nil } diff --git a/pkg/utils/watcher.go b/pkg/utils/watcher.go index fa018b704b3..25ffdcbe3a3 100644 --- a/pkg/utils/watcher.go +++ b/pkg/utils/watcher.go @@ -5,6 +5,7 @@ package utils import ( + "errors" "fmt" "path/filepath" "strings" @@ -24,7 +25,8 @@ func GetWatcherPIDs() ([]int, error) { return nil, fmt.Errorf("failed to initialize process.Stats: %w", err) } pidMap, _, err := procStats.FetchPids() - if err != nil { + if err != nil && !errors.Is(err, process.NonFatalErr{}) { + // return only if the error is fatal in nature return nil, fmt.Errorf("failed to fetch pids: %w", err) } var pids []int