[#xx] Fix invalid log metric namespace identifier
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful

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() 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}),
} }