diff --git a/node/metrics.go b/node/metrics.go index 911d84723a..94d604cc8f 100644 --- a/node/metrics.go +++ b/node/metrics.go @@ -168,3 +168,12 @@ func makeSyncMetrics(syncReader sync.Reader, bcReader blockchain.Reader) sync.Ev }, } } + +func makeJunoMetrics(version string) { + prometheus.MustRegister(prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "juno", + Name: "info", + Help: "Information about the Juno binary", + ConstLabels: prometheus.Labels{"version": version}, + })) +} diff --git a/node/node.go b/node/node.go index 3306aa9ba2..d018703e0f 100644 --- a/node/node.go +++ b/node/node.go @@ -134,6 +134,7 @@ func New(cfg *Config, version string) (*Node, error) { //nolint:gocyclo,funlen services = append(services, makeRPCOverWebsocket(cfg.WebsocketHost, cfg.WebsocketPort, rpcServers, log, cfg.Metrics)) } if cfg.Metrics { + makeJunoMetrics(version) database.WithListener(makeDBMetrics()) rpcMetrics, legacyRPCMetrics := makeRPCMetrics(path, legacyPath) jsonrpcServer.WithListener(rpcMetrics)