|
@@ -119,6 +119,11 @@ func StartServer(cancel context.CancelFunc) error {
|
|
|
}
|
|
|
|
|
|
func StartRequest() context.CancelFunc {
|
|
|
+ if !enabled {
|
|
|
+ return func() {}
|
|
|
+ }
|
|
|
+
|
|
|
+ requestsTotal.Inc()
|
|
|
return startDuration(requestDuration)
|
|
|
}
|
|
|
|
|
@@ -147,12 +152,6 @@ func IncrementErrorsTotal(t string) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func IncrementRequestsTotal() {
|
|
|
- if enabled {
|
|
|
- requestsTotal.Inc()
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
func ObserveBufferSize(t string, size int) {
|
|
|
if enabled {
|
|
|
bufferSize.With(prometheus.Labels{"type": t}).Observe(float64(size))
|