frostfs-node/internal/metrics/application.go
Ekaterina Lebedeva 2832f44437
All checks were successful
Vulncheck / Vulncheck (push) Successful in 5m30s
Tests and linters / Run gofumpt (push) Successful in 5m52s
Pre-commit hooks / Pre-commit (push) Successful in 6m37s
Build / Build Components (push) Successful in 6m43s
Tests and linters / Staticcheck (push) Successful in 6m42s
Tests and linters / Tests (push) Successful in 7m37s
Tests and linters / Tests with -race (push) Successful in 7m33s
Tests and linters / gopls check (push) Successful in 7m29s
Tests and linters / Lint (push) Successful in 7m54s
[#1531] metrics: Rename app_info metric
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-23 10:40:18 +00:00

22 lines
582 B
Go

package metrics
import (
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
"github.com/prometheus/client_golang/prometheus"
)
type ApplicationInfo struct {
versionValue *prometheus.GaugeVec
}
func NewApplicationInfo(version string) *ApplicationInfo {
appInfo := &ApplicationInfo{
versionValue: metrics.NewGaugeVec(prometheus.GaugeOpts{
Namespace: namespace,
Name: "app_info",
Help: "General information about the application.",
}, []string{"version"}),
}
appInfo.versionValue.With(prometheus.Labels{"version": version})
return appInfo
}