@@ -11,14 +11,11 @@ import (
11
11
"runtime/pprof"
12
12
"time"
13
13
14
+ "github.com/gin-contrib/zap"
15
+ "github.com/gin-gonic/gin"
14
16
"github.com/prometheus/client_golang/prometheus"
15
17
"github.com/prometheus/client_golang/prometheus/promauto"
16
-
17
- "github.com/gin-contrib/zap"
18
-
19
18
"github.com/prometheus/client_golang/prometheus/promhttp"
20
-
21
- "github.com/gin-gonic/gin"
22
19
"github.com/txn2/rxtx/rtq"
23
20
"go.uber.org/zap"
24
21
)
@@ -104,32 +101,32 @@ func main() {
104
101
105
102
// Prometheus Metrics
106
103
processed := promauto .NewCounter (prometheus.CounterOpts {
107
- Name : "total_messages_received " ,
104
+ Name : "rxtx_total_messages_received " ,
108
105
Help : "Total number of messages received." ,
109
106
})
110
107
111
108
queued := promauto .NewGauge (prometheus.GaugeOpts {
112
- Name : "messages_in_queue " ,
109
+ Name : "rxtx_messages_in_queue " ,
113
110
Help : "Number os messages in the queue." ,
114
111
})
115
112
116
113
txBatches := promauto .NewCounter (prometheus.CounterOpts {
117
- Name : "tx_batches " ,
114
+ Name : "rxtx_tx_batches " ,
118
115
Help : "Total number of batch transmissions." ,
119
116
})
120
117
121
118
txFail := promauto .NewCounter (prometheus.CounterOpts {
122
- Name : "tx_fails " ,
119
+ Name : "rxtx_tx_fails " ,
123
120
Help : "Total number of transaction errors." ,
124
121
})
125
122
126
123
dbErr := promauto .NewCounter (prometheus.CounterOpts {
127
- Name : "db_errors " ,
124
+ Name : "rxtx_db_errors " ,
128
125
Help : "Total number database errors." ,
129
126
})
130
127
131
128
msgErr := promauto .NewCounter (prometheus.CounterOpts {
132
- Name : "msg_errors " ,
129
+ Name : "rxtx_msg_errors " ,
133
130
Help : "Total number message errors." ,
134
131
})
135
132
0 commit comments