mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-29 01:04:15 -04:00 
			
		
		
		
	Split out protocol for request size
This commit is contained in:
		| @@ -44,7 +44,7 @@ func Report(state middleware.State, zone, rcode string, size int, start time.Tim | |||||||
|  |  | ||||||
| 	requestCount.WithLabelValues(zone, net, fam).Inc() | 	requestCount.WithLabelValues(zone, net, fam).Inc() | ||||||
| 	requestDuration.WithLabelValues(zone).Observe(float64(time.Since(start) / time.Second)) | 	requestDuration.WithLabelValues(zone).Observe(float64(time.Since(start) / time.Second)) | ||||||
| 	requestSize.WithLabelValues(zone).Observe(float64(state.Size())) | 	requestSize.WithLabelValues(zone, net).Observe(float64(state.Size())) | ||||||
| 	if state.Do() { | 	if state.Do() { | ||||||
| 		requestDo.WithLabelValues(zone).Inc() | 		requestDo.WithLabelValues(zone).Inc() | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ func define() { | |||||||
| 		Name:      "request_size_bytes", | 		Name:      "request_size_bytes", | ||||||
| 		Help:      "Size of the EDNS0 UDP buffer in bytes (64K for TCP).", | 		Help:      "Size of the EDNS0 UDP buffer in bytes (64K for TCP).", | ||||||
| 		Buckets:   []float64{0, 100, 200, 300, 400, 511, 1023, 2047, 4095, 8291, 16e3, 32e3, 48e3, 64e3}, | 		Buckets:   []float64{0, 100, 200, 300, 400, 511, 1023, 2047, 4095, 8291, 16e3, 32e3, 48e3, 64e3}, | ||||||
| 	}, []string{"zone"}) | 	}, []string{"zone", "proto"}) | ||||||
|  |  | ||||||
| 	requestDo = prometheus.NewCounterVec(prometheus.CounterOpts{ | 	requestDo = prometheus.NewCounterVec(prometheus.CounterOpts{ | ||||||
| 		Namespace: middleware.Namespace, | 		Namespace: middleware.Namespace, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user