diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-11-21 16:55:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-21 16:55:28 -0800 |
| commit | 5f7a292334e952ac17fd7458d31c3d36e0b98769 (patch) | |
| tree | 800dee668aa04abdfc3587842f0065d3f8813e4a /weed/util | |
| parent | a77dfb1ddd36d071f90acc01a1399e7ae52865d1 (diff) | |
| download | seaweedfs-5f7a292334e952ac17fd7458d31c3d36e0b98769.tar.xz seaweedfs-5f7a292334e952ac17fd7458d31c3d36e0b98769.zip | |
add build info metrics (#7525)
* add build info metrics
* unused
* metrics on build
* size limit
* once
Diffstat (limited to 'weed/util')
| -rw-r--r-- | weed/util/version/constants.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/util/version/constants.go b/weed/util/version/constants.go index 33b226202..8cbe2225a 100644 --- a/weed/util/version/constants.go +++ b/weed/util/version/constants.go @@ -3,6 +3,7 @@ package version import ( "fmt" + "github.com/seaweedfs/seaweedfs/weed/stats" "github.com/seaweedfs/seaweedfs/weed/util" ) @@ -14,6 +15,11 @@ var ( COMMIT = "" ) +func init() { + // Set version info in stats for Prometheus metrics + stats.SetVersionInfo(VERSION_NUMBER, COMMIT, util.SizeLimit) +} + func Version() string { return VERSION + " " + COMMIT } |
