mapserver/tilerenderer/prometheus.go

26 lines
569 B
Go
Raw Normal View History

2019-02-15 10:36:48 +03:00
package tilerenderer
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
renderedTiles = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "tiles_rendered_count",
Help: "Overall count of rendered tiles",
},
[]string{"zoom"},
)
renderDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "tiles_render_time",
Help: "Histogram for tile render timings",
Buckets: prometheus.LinearBuckets(0.01, 0.05, 10),
})
)
func init() {
prometheus.MustRegister(renderedTiles)
prometheus.MustRegister(renderDuration)
}