v1.1.3: surface daemon version + commit on maglev_info
Extend the existing maglev_info gauge with two more labels: - version (build version, from -ldflags) - commit (git short hash) Mirrors nginx_ipng_stats-plugin's nginx_ipng_info pattern: a label-only gauge value=1 carrying build metadata for Prometheus to query and Grafana dashboards to render. Useful for spotting version drift across the fleet with a single query, and for populating the "Version" column of the Maglev Nodes table on the global overview. Existing label source_tag is preserved. Plumbing: NewCollector / Register signatures gain version and commit string parameters; main.go reads them from cmd.Version() and cmd.Commit() (already imported as 'buildinfo').
This commit is contained in:
@@ -15,7 +15,7 @@ FRONTEND_WEB_SRC := $(shell find cmd/frontend/web/src -type f 2>/dev/null) \
|
||||
FRONTEND_WEB_DIST := cmd/frontend/web/dist/index.html
|
||||
|
||||
NATIVE_ARCH := $(shell go env GOARCH)
|
||||
VERSION := 1.1.2
|
||||
VERSION := 1.1.3
|
||||
COMMIT_HASH := $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -X '$(MODULE)/cmd.version=$(VERSION)' \
|
||||
|
||||
Reference in New Issue
Block a user