Add container to monitor in runtime
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
6
vendor/github.com/docker/go-metrics/namespace.go
generated
vendored
6
vendor/github.com/docker/go-metrics/namespace.go
generated
vendored
@@ -152,7 +152,11 @@ func (n *Namespace) NewDesc(name, help string, unit Unit, labels ...string) *pro
|
||||
if string(unit) != "" {
|
||||
name = fmt.Sprintf("%s_%s", name, unit)
|
||||
}
|
||||
name = fmt.Sprintf("%s_%s_%s", n.name, n.subsystem, name)
|
||||
namespace := n.name
|
||||
if n.subsystem != "" {
|
||||
namespace = fmt.Sprintf("%s_%s", namespace, n.subsystem)
|
||||
}
|
||||
name = fmt.Sprintf("%s_%s", namespace, name)
|
||||
return prometheus.NewDesc(name, help, labels, prometheus.Labels(n.labels))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user