[#xx] Fix invalid log metric namespace identifier #445

Merged
fyrchik merged 1 commit from ale64bit/frostfs-node:fix/xx-fix-log-metrics-ns-bug into master 2023-06-13 12:55:59 +00:00
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 344d6b2ae1 - Show all commits

View file

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

View file

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

View file

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