File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ require (
9
9
github.com/go-resty/resty/v2 v2.7.0
10
10
github.com/gorilla/mux v1.8.0
11
11
github.com/gorilla/websocket v1.5.0
12
- github.com/hyperledger/firefly-common v1.2.6
12
+ github.com/hyperledger/firefly-common v1.2.7
13
13
github.com/oklog/ulid/v2 v2.1.0
14
14
github.com/prometheus/client_golang v1.13.0
15
15
github.com/sirupsen/logrus v1.9.0
Original file line number Diff line number Diff line change @@ -184,8 +184,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
184
184
github.com/hpcloud/tail v1.0.0 /go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU =
185
185
github.com/huandu/xstrings v1.3.1 h1:4jgBlKK6tLKFvO8u5pmYjG91cqytmDCDvGh7ECVFfFs =
186
186
github.com/huandu/xstrings v1.3.1 /go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE =
187
- github.com/hyperledger/firefly-common v1.2.6 h1:NDf42a2iH6QSt3p7KkdT1pTDoW/NljcT+ClEfZRh61c =
188
- github.com/hyperledger/firefly-common v1.2.6 /go.mod h1:uYO8DMgT3OGoF2R4Bew1Ql4BS3udYGzPs59sJH1V3E4 =
187
+ github.com/hyperledger/firefly-common v1.2.7 h1:voFbNVRFHZ64EJbyxCtMbLLriNRyqrl+wdUEqpgexHs =
188
+ github.com/hyperledger/firefly-common v1.2.7 /go.mod h1:uYO8DMgT3OGoF2R4Bew1Ql4BS3udYGzPs59sJH1V3E4 =
189
189
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 /go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc =
190
190
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 /go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc =
191
191
github.com/imdario/mergo v0.3.11 /go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA =
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ package metrics
18
18
19
19
import (
20
20
"context"
21
- "fmt"
22
21
"net/http"
23
22
"time"
24
23
@@ -29,11 +28,11 @@ import (
29
28
"github.com/prometheus/client_golang/prometheus/promhttp"
30
29
)
31
30
32
- const metricsTransactionManagerPrefix = "tm "
31
+ const metricsTransactionManagerComponentName = "transaction_manager "
33
32
34
33
// REST api-server and transaction handler are sub-subsystem
35
- var metricsTransactionHandlerSubsystemName = fmt . Sprintf ( "%s_%s" , metricsTransactionManagerPrefix , " th")
36
- var metricsRESTAPIServerSubSystemName = fmt . Sprintf ( "%s_%s" , metricsTransactionManagerPrefix , " api_server_rest")
34
+ var metricsTransactionHandlerSubsystemName = " th"
35
+ var metricsRESTAPIServerSubSystemName = " api_server_rest"
37
36
38
37
type metricsManager struct {
39
38
ctx context.Context
@@ -44,7 +43,7 @@ type metricsManager struct {
44
43
}
45
44
46
45
func NewMetricsManager (ctx context.Context ) Metrics {
47
- metricsRegistry := metric .NewPrometheusMetricsRegistry ()
46
+ metricsRegistry := metric .NewPrometheusMetricsRegistry (metricsTransactionManagerComponentName )
48
47
txHandlerMetricsManager , _ := metricsRegistry .NewMetricsManagerForSubsystem (ctx , metricsTransactionHandlerSubsystemName )
49
48
_ = metricsRegistry .NewHTTPMetricsInstrumentationsForSubsystem (
50
49
ctx ,
You can’t perform that action at this time.
0 commit comments