1
0
forked from MTSR/mapserver
mapserver/mapblockparser/prometheus.go
2019-06-13 08:04:32 +02:00

25 lines
561 B
Go

package mapblockparser
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
parsedMapBlocks = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "mapblocks_parsed_count",
Help: "Overall count of parsed mapblocks",
},
)
parseDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "mapblock_parse_time",
Help: "Histogram for mapblock parse timings",
Buckets: prometheus.LinearBuckets(0.001, 0.002, 10),
})
)
func init() {
prometheus.MustRegister(parsedMapBlocks)
prometheus.MustRegister(parseDuration)
}