aboutsummaryrefslogtreecommitdiff
path: root/weed/util
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-11-21 16:55:28 -0800
committerGitHub <noreply@github.com>2025-11-21 16:55:28 -0800
commit5f7a292334e952ac17fd7458d31c3d36e0b98769 (patch)
tree800dee668aa04abdfc3587842f0065d3f8813e4a /weed/util
parenta77dfb1ddd36d071f90acc01a1399e7ae52865d1 (diff)
downloadseaweedfs-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.go6
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
}