Skip to content

Commit a6262aa

Browse files
committed
Add method call counter metrics
1 parent 08c6d19 commit a6262aa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

plugin/metrics.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ import (
77
)
88

99
var (
10+
GetPluginConfigCounter = promauto.NewCounter(prometheus.CounterOpts{
11+
Namespace: metrics.Namespace,
12+
Name: "get_plugin_config_total",
13+
Help: "The total number of calls to the getPluginConfig method",
14+
})
15+
OnClosedCounter = promauto.NewCounter(prometheus.CounterOpts{
16+
Namespace: metrics.Namespace,
17+
Name: "on_closed_total",
18+
Help: "The total number of calls to the onClosed method",
19+
})
20+
OnTrafficFromClientCounter = promauto.NewCounter(prometheus.CounterOpts{
21+
Namespace: metrics.Namespace,
22+
Name: "on_traffic_from_client_total",
23+
Help: "The total number of calls to the onTrafficFromClient method",
24+
})
25+
OnTrafficFromServerCounter = promauto.NewCounter(prometheus.CounterOpts{
26+
Namespace: metrics.Namespace,
27+
Name: "on_traffic_from_server_total",
28+
Help: "The total number of calls to the onTrafficFromServer method",
29+
})
30+
1031
CacheHitsCounter = promauto.NewCounter(prometheus.CounterOpts{
1132
Namespace: metrics.Namespace,
1233
Name: "cache_hits_total",

0 commit comments

Comments
 (0)