10
10
Name : "pinpoint_request_duration_milliseconds" ,
11
11
Help : "latency of a given service - operation" ,
12
12
Buckets : []float64 {5 , 10 , 25 , 50 , 75 , 100 , 200 , 500 , 800 , 1000 , 3000 , 5000 },
13
- }, []string {"service" , "operation" })
13
+ }, []string {"service" , "operation" , "response_code" })
14
14
15
15
// RequestsTotal is the metric
16
16
RequestsTotal = prometheus .NewCounterVec (prometheus.CounterOpts {
@@ -24,24 +24,26 @@ var (
24
24
Help : "number of websocket connections for a request by service" ,
25
25
}, []string {"service" })
26
26
27
- // RequestBytesSum is the metric
28
- RequestBytesSum = prometheus .NewGaugeVec (prometheus.GaugeOpts {
29
- Name : "pinpoint_request_bytes_sum" ,
30
- Help : "sum of bytes for a request by service - operation" ,
31
- }, []string {"service" , "operation" })
27
+ // RequestBytes is the metric
28
+ RequestBytes = prometheus .NewHistogramVec (prometheus.HistogramOpts {
29
+ Name : "pinpoint_request_bytes" ,
30
+ Help : "size of request bytes in a given service - operation" ,
31
+ Buckets : []float64 {.5 , 1 , 5 , 10 , 25 , 50 , 100 , 250 , 500 , 1000 , 2500 , 5000 , 10000 , 30000 , 60000 , 300000 , 600000 , 1800000 , 3600000 },
32
+ }, []string {"service" , "operation" , "response_code" })
32
33
33
- // ResponseBytesSum is the metric
34
- ResponseBytesSum = prometheus .NewGaugeVec (prometheus.GaugeOpts {
35
- Name : "pinpoint_response_bytes_sum" ,
36
- Help : "sum of bytes for a response by service - operation" ,
37
- }, []string {"service" , "operation" })
34
+ // ResponseBytes is the metric
35
+ ResponseBytes = prometheus .NewHistogramVec (prometheus.HistogramOpts {
36
+ Name : "pinpoint_response_bytes" ,
37
+ Help : "size of response bytes in a given service - operation" ,
38
+ Buckets : []float64 {.5 , 1 , 5 , 10 , 25 , 50 , 100 , 250 , 500 , 1000 , 2500 , 5000 , 10000 , 30000 , 60000 , 300000 , 600000 , 1800000 , 3600000 },
39
+ }, []string {"service" , "operation" , "response_code" })
38
40
)
39
41
40
42
func init () {
41
43
prometheus .MustRegister (RequestDurationMilliseconds )
42
44
prometheus .MustRegister (RequestsTotal )
43
- prometheus .MustRegister (RequestBytesSum )
44
- prometheus .MustRegister (ResponseBytesSum )
45
+ prometheus .MustRegister (RequestBytes )
46
+ prometheus .MustRegister (ResponseBytes )
45
47
prometheus .MustRegister (WebsocketConnections )
46
48
prometheus .MustRegister (prometheus .NewBuildInfoCollector ())
47
49
}
0 commit comments