|
@@ -16,7 +16,6 @@ var (
|
|
prometheusRequestDuration prometheus.Histogram
|
|
prometheusRequestDuration prometheus.Histogram
|
|
prometheusDownloadDuration prometheus.Histogram
|
|
prometheusDownloadDuration prometheus.Histogram
|
|
prometheusProcessingDuration prometheus.Histogram
|
|
prometheusProcessingDuration prometheus.Histogram
|
|
- prometheusBuffersTotal *prometheus.CounterVec
|
|
|
|
prometheusBufferSize *prometheus.HistogramVec
|
|
prometheusBufferSize *prometheus.HistogramVec
|
|
)
|
|
)
|
|
|
|
|
|
@@ -50,11 +49,6 @@ func initPrometheus() {
|
|
Help: "A histogram of the image processing latency.",
|
|
Help: "A histogram of the image processing latency.",
|
|
})
|
|
})
|
|
|
|
|
|
- prometheusBuffersTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
|
|
|
|
- Name: "buffers_total",
|
|
|
|
- Help: "A counter of the total number of buffers imgproxy allocated.",
|
|
|
|
- }, []string{"type"})
|
|
|
|
-
|
|
|
|
prometheusBufferSize = prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
|
prometheusBufferSize = prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
|
Name: "buffer_size_megabytes",
|
|
Name: "buffer_size_megabytes",
|
|
Help: "A histogram of the buffer size in megabytes.",
|
|
Help: "A histogram of the buffer size in megabytes.",
|
|
@@ -66,7 +60,6 @@ func initPrometheus() {
|
|
prometheusRequestDuration,
|
|
prometheusRequestDuration,
|
|
prometheusDownloadDuration,
|
|
prometheusDownloadDuration,
|
|
prometheusProcessingDuration,
|
|
prometheusProcessingDuration,
|
|
- prometheusBuffersTotal,
|
|
|
|
prometheusBufferSize,
|
|
prometheusBufferSize,
|
|
)
|
|
)
|
|
|
|
|
|
@@ -96,10 +89,6 @@ func incrementPrometheusErrorsTotal(t string) {
|
|
prometheusErrorsTotal.With(prometheus.Labels{"type": t}).Inc()
|
|
prometheusErrorsTotal.With(prometheus.Labels{"type": t}).Inc()
|
|
}
|
|
}
|
|
|
|
|
|
-func incrementBuffersTotal(t string) {
|
|
|
|
- prometheusBuffersTotal.With(prometheus.Labels{"type": t}).Inc()
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
func observeBufferSize(t string, cap int) {
|
|
func observeBufferSize(t string, cap int) {
|
|
size := float64(cap) / 1024.0 / 1024.0
|
|
size := float64(cap) / 1024.0 / 1024.0
|
|
prometheusBufferSize.With(prometheus.Labels{"type": t}).Observe(size)
|
|
prometheusBufferSize.With(prometheus.Labels{"type": t}).Observe(size)
|