mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
internal/debug: fix some minor issues in file pyroscope.go
This commit is contained in:
parent
251b863107
commit
1aa37c2ff1
1 changed files with 8 additions and 3 deletions
|
|
@ -47,8 +47,9 @@ var (
|
||||||
}
|
}
|
||||||
pyroscopeAuthPasswordFlag = &cli.StringFlag{
|
pyroscopeAuthPasswordFlag = &cli.StringFlag{
|
||||||
Name: "pyroscope.password",
|
Name: "pyroscope.password",
|
||||||
Usage: "Pyroscope basic authentication password",
|
Usage: "Pyroscope basic authentication password (prefer setting PYROSCOPE_PASSWORD env var instead of CLI flag)",
|
||||||
Value: "",
|
Value: "",
|
||||||
|
EnvVars: []string{"PYROSCOPE_PASSWORD"},
|
||||||
Category: flags.LoggingCategory,
|
Category: flags.LoggingCategory,
|
||||||
}
|
}
|
||||||
pyroscopeTagsFlag = &cli.StringFlag{
|
pyroscopeTagsFlag = &cli.StringFlag{
|
||||||
|
|
@ -74,7 +75,11 @@ func startPyroscope(ctx *cli.Context) error {
|
||||||
if tag == "" {
|
if tag == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
k, v, _ := strings.Cut(tag, "=")
|
k, v, ok := strings.Cut(tag, "=")
|
||||||
|
if !ok || k == "" {
|
||||||
|
// Skip tags that do not conform to the expected key=value format
|
||||||
|
continue
|
||||||
|
}
|
||||||
tags[k] = v
|
tags[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,7 +110,7 @@ func startPyroscope(ctx *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
pyroscopeProfiler = profiler
|
pyroscopeProfiler = profiler
|
||||||
log.Info("Enabled Pyroscope")
|
log.Info("Enabled Pyroscope", "server", server)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue