aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-01-10 23:05:27 +0500
committerGitHub <noreply@github.com>2024-01-10 10:05:27 -0800
commita7fc723ae0992c787629ad57c6f2c4f05c1de553 (patch)
treea250a80be0380ccccc10b2dd7e32d8a2e2356ae4 /weed/stats/metrics.go
parentfe417ee02d1dbe722b0061c3f82dc1916157f36f (diff)
downloadseaweedfs-a7fc723ae0992c787629ad57c6f2c4f05c1de553.tar.xz
seaweedfs-a7fc723ae0992c787629ad57c6f2c4f05c1de553.zip
chore: add status code for request_total metrics (#5188)
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 87e5f2f4e..49a3b090b 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -84,6 +84,14 @@ var (
Subsystem: "filer",
Name: "request_total",
Help: "Counter of filer requests.",
+ }, []string{"type", "code"})
+
+ FilerHandlerCounter = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Namespace: Namespace,
+ Subsystem: "filer",
+ Name: "handler_total",
+ Help: "Counter of filer handlers.",
}, []string{"type"})
FilerRequestHistogram = prometheus.NewHistogramVec(
@@ -134,6 +142,14 @@ var (
Subsystem: "volumeServer",
Name: "request_total",
Help: "Counter of volume server requests.",
+ }, []string{"type", "code"})
+
+ VolumeServerHandlerCounter = prometheus.NewCounterVec(
+ prometheus.CounterOpts{
+ Namespace: Namespace,
+ Subsystem: "volumeServer",
+ Name: "handler_total",
+ Help: "Counter of volume server handlers.",
}, []string{"type"})
VolumeServerVacuumingCompactCounter = prometheus.NewCounterVec(
@@ -245,6 +261,7 @@ func init() {
Gather.MustRegister(MasterReplicaPlacementMismatch)
Gather.MustRegister(FilerRequestCounter)
+ Gather.MustRegister(FilerHandlerCounter)
Gather.MustRegister(FilerRequestHistogram)
Gather.MustRegister(FilerStoreCounter)
Gather.MustRegister(FilerStoreHistogram)
@@ -254,6 +271,7 @@ func init() {
Gather.MustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}))
Gather.MustRegister(VolumeServerRequestCounter)
+ Gather.MustRegister(VolumeServerHandlerCounter)
Gather.MustRegister(VolumeServerRequestHistogram)
Gather.MustRegister(VolumeServerVacuumingCompactCounter)
Gather.MustRegister(VolumeServerVacuumingCommitCounter)