@@ -12,14 +12,14 @@ import (
12
12
var (
13
13
// TODO: we can tweak the level of detail for the time buckets:
14
14
// this will generate 20 time series for the metric
15
- timeBucketsOpt : = metric.WithExplicitBucketBoundaries (
15
+ timeBucketsOpt = metric .WithExplicitBucketBoundaries (
16
16
0.010 , 0.020 , 0.030 , 0.040 ,
17
17
0.050 , 0.065 , 0.080 , 0.100 ,
18
18
0.150 , 0.200 , 0.250 , 0.300 ,
19
19
0.500 , 0.750 , 1.000 , 1.500 ,
20
20
2.000 , 5.000 , 10.000 )
21
21
22
- sizeBucketOpt : = metric.WithExplicitBucketBoundaries (
22
+ sizeBucketsOpt = metric .WithExplicitBucketBoundaries (
23
23
0 , 256 , 512 , 1024 , // <- reasonable response sizes
24
24
4 * 1024 , 8 * 1024 , 16 * 1024 , 32 * 1024 , // <- these starts to be big
25
25
64 * 1024 , 4 * 64 * 1024 , 8 * 64 * 1024 , 16 * 64 * 1024 , // <- those are huge for an api response 64k to 1 Meg
@@ -81,14 +81,14 @@ func newTransportMetrics(metricsOpts *TransportMetricsOptions, meter metric.Mete
81
81
82
82
tm .requestContentLength , _ = meter .Int64Counter ("requests-content-length" ) // the value of the Content-Length header for the request
83
83
84
- tm .responseLatency , _ = meter .Float64Histogram ("response-latency" , timeBucketsOpts )
84
+ tm .responseLatency , _ = meter .Float64Histogram ("response-latency" , timeBucketsOpt )
85
85
86
- tm .responseContentLength , _ = meter .Int64Histogram ("response-content-length" , sizeBucketOpt )
86
+ tm .responseContentLength , _ = meter .Int64Histogram ("response-content-length" , sizeBucketsOpt )
87
87
88
88
tm .detailsEnabled = metricsOpts .DetailedConnection
89
89
tm .getConnLatency , _ = meter .Float64Histogram ("request-get-conn-latency" , timeBucketsOpt )
90
- tm .dnsLatency , _ = meter .Float64Histogram ("request-dns-latency" , timeBucketOpt )
91
- tm .tlsLatency , _ = meter .Float64Histogram ("request-tls-latency" , timeBucketOpt )
90
+ tm .dnsLatency , _ = meter .Float64Histogram ("request-dns-latency" , timeBucketsOpt )
91
+ tm .tlsLatency , _ = meter .Float64Histogram ("request-tls-latency" , timeBucketsOpt )
92
92
return & tm
93
93
}
94
94
0 commit comments