[feat] add prometheus metrics for country
[getmyip.git] / metrics.go
1 package main
2
3 import (
4         "github.com/prometheus/client_golang/prometheus"
5         "github.com/prometheus/client_golang/prometheus/promauto"
6 )
7
8 var hitsPerCountry = promauto.NewCounterVec(prometheus.CounterOpts{
9         Name: "getmyip_hits",
10         Help: "Number of hits in the geolocation service",
11 },
12         []string{"country"},
13 )