[#xx] Fix invalid log metric namespace identifier

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-06-13 15:27:38 +03:00
parent 4887f489a1
commit 344d6b2ae1
3 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ func main() {
cfg, err = newConfig()
exitErr(err)
logPrm.MetricsNamespace = "frostfs-ir"
logPrm.MetricsNamespace = "frostfs_ir"
err = logPrm.SetLevelString(
cfg.GetString("logger.level"),
)

View file

@ -542,7 +542,7 @@ func initCfg(appCfg *config.Config) *cfg {
logPrm, err := c.loggerPrm()
fatalOnErr(err)
logPrm.MetricsNamespace = "frostfs-node"
logPrm.MetricsNamespace = "frostfs_node"
log, err := logger.NewLogger(logPrm)
fatalOnErr(err)

View file

@ -9,7 +9,7 @@ import (
)
const (
logSubsystem = "log"
logSubsystem = "logger"
logLevelLabel = "level"
logDroppedLabel = "dropped"
)
@ -23,7 +23,7 @@ func newLogMetrics(namespace string) *logMetrics {
logCount: metrics.NewCounterVec(prometheus.CounterOpts{
Namespace: namespace,
Subsystem: logSubsystem,
Name: "log_count",
Name: "entry_count",
Help: "Total log entries emitted or dropped by severity level",
}, []string{logLevelLabel, logDroppedLabel}),
}