Option to censor raw reports by command line args and env vars.

This commit is contained in:
Filip Barl
2019-02-15 17:31:08 +01:00
parent c0b2690679
commit 97fdcdc525
11 changed files with 103 additions and 21 deletions

View File

@@ -2,7 +2,6 @@ package process
import (
"strconv"
"strings"
"github.com/weaveworks/common/mtime"
"github.com/weaveworks/scope/report"
@@ -93,7 +92,7 @@ func (r *Reporter) processTopology() (report.Topology, error) {
if p.Cmdline != "" {
if r.noCommandLineArguments {
node = node.WithLatest(Cmdline, now, strings.Split(p.Cmdline, " ")[0])
node = node.WithLatest(Cmdline, now, report.StripCommandArgs(p.Cmdline))
} else {
node = node.WithLatest(Cmdline, now, p.Cmdline)
}