Skip to content

Commit

Permalink
usm: nodejs: Fix linter issues (#31259)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarb authored Nov 25, 2024
1 parent 1b7481c commit 2e34dd0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/network/usm/nodejs.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ func (m *nodeJSMonitor) Start() {
return
}

m.attacher.Start() //nolint:errcheck // TODO
log.Info("Node JS TLS monitoring enabled")
if err := m.attacher.Start(); err != nil {
log.Errorf("cannot start nodeJS attacher: %s", err)
} else {
log.Info("Node JS TLS monitoring enabled")
}
}

// Stop the nodeJSMonitor.
Expand All @@ -162,8 +165,8 @@ func (m *nodeJSMonitor) Stop() {
m.attacher.Stop()
}

// getNodeJSPath checks if the given PID is a NodeJS process and returns the path to the binary
func isNodeJSBinary(path string, procInfo *uprobes.ProcInfo) bool { //nolint:revive // TODO
// isNodeJSBinary returns true if the process is a NodeJS binary.
func isNodeJSBinary(_ string, procInfo *uprobes.ProcInfo) bool {
exe, err := procInfo.Exe()
if err != nil {
return false
Expand Down

0 comments on commit 2e34dd0

Please sign in to comment.