1
0
forked from MTSR/mapserver
mapserver/server/tilerenderer/prometheus.go
2019-02-15 08:36:48 +01:00

26 lines
569 B
Go

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)
}