Skip to content

Commit

Permalink
Metrics: Add algod version to metrics (#6003)
Browse files Browse the repository at this point in the history
Co-authored-by: cce <[email protected]>
  • Loading branch information
hsoerensen and cce authored Jun 26, 2024
1 parent c99a1c9 commit f523300
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions daemon/algod/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"os"
"os/signal"
"path/filepath"
"runtime"
"strings"
"syscall"
"time"
Expand Down Expand Up @@ -230,6 +231,16 @@ func (s *Server) Initialize(cfg config.Local, phonebookAddresses []string, genes
NodeExporterPath: cfg.NodeExporterPath,
})

var currentVersion = config.GetCurrentVersion()
var algodBuildInfoGauge = metrics.MakeGauge(metrics.MetricName{Name: "algod_build_info", Description: "Algod build info"})
algodBuildInfoGauge.SetLabels(1, map[string]string{
"version": currentVersion.String(),
"goarch": runtime.GOARCH,
"goos": runtime.GOOS,
"commit": currentVersion.CommitHash,
"channel": currentVersion.Channel,
})

var serverNode ServerNode
if cfg.EnableFollowMode {
var followerNode *node.AlgorandFollowerNode
Expand Down

0 comments on commit f523300

Please sign in to comment.