Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9f3dfa

Browse files
committed
added method to requests concurrent
1 parent3ff76bb commitd9f3dfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎coderd/httpmw/prometheus.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Prometheus(register prometheus.Registerer) func(http.Handler) http.Handler
2727
Subsystem:"api",
2828
Name:"concurrent_requests",
2929
Help:"The number of concurrent API requests.",
30-
}, []string{"path"})
30+
}, []string{"method","path"})
3131
websocketsConcurrent:=factory.NewGaugeVec(prometheus.GaugeOpts{
3232
Namespace:"coderd",
3333
Subsystem:"api",
@@ -82,8 +82,8 @@ func Prometheus(register prometheus.Registerer) func(http.Handler) http.Handler
8282

8383
dist=websocketsDist
8484
}else {
85-
requestsConcurrent.WithLabelValues(path).Inc()
86-
deferrequestsConcurrent.WithLabelValues(path).Dec()
85+
requestsConcurrent.WithLabelValues(method,path).Inc()
86+
deferrequestsConcurrent.WithLabelValues(method,path).Dec()
8787

8888
dist=requestsDist
8989
distOpts= []string{method}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp