This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch reduce-handle-connect-time
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git
The following commit(s) were added to refs/heads/reduce-handle-connect-time by
this push:
new 425542f remove monitor self
425542f is described below
commit 425542fd860cc08a4147daff231968baa89a1535
Author: mrproliu <[email protected]>
AuthorDate: Mon Dec 30 09:55:00 2024 +0800
remove monitor self
---
go.mod | 2 +-
pkg/accesslog/common/filter.go | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/go.mod b/go.mod
index 5cc0c93..bb05af7 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,6 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v0.5.4
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639
- github.com/mdlayher/netlink v1.7.2
github.com/orcaman/concurrent-map v1.0.0
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/sirupsen/logrus v1.9.3
@@ -46,6 +45,7 @@ require (
github.com/josharian/native v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.5 // indirect
+ github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/socket v0.5.1 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd //
indirect
diff --git a/pkg/accesslog/common/filter.go b/pkg/accesslog/common/filter.go
index db23ef5..34baee3 100644
--- a/pkg/accesslog/common/filter.go
+++ b/pkg/accesslog/common/filter.go
@@ -18,6 +18,7 @@
package common
import (
+ "os"
"strings"
"github.com/apache/skywalking-rover/pkg/process/api"
@@ -46,11 +47,11 @@ func NewStaticMonitorFilter(namespaces, clusters []string)
*StaticMonitorFilter
}
func (s *StaticMonitorFilter) ShouldIncludeProcesses(processes
[]api.ProcessInterface) (res []api.ProcessInterface) {
- //var selfPid = os.Getpid()
+ var selfPid = os.Getpid()
for _, entity := range processes {
- //if int(entity.Pid()) == selfPid {
- // continue
- //}
+ if int(entity.Pid()) == selfPid {
+ continue
+ }
if entity.DetectType() != api.Kubernetes { // for now, we only
have the kubernetes detected processes
continue
}