summaryrefslogtreecommitdiff
path: root/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'metrics.go')
-rw-r--r--metrics.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/metrics.go b/metrics.go
new file mode 100644
index 0000000..2c581ba
--- /dev/null
+++ b/metrics.go
@@ -0,0 +1,13 @@
+package main
+
+import (
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+)
+
+var hitsPerCountry = promauto.NewCounterVec(prometheus.CounterOpts{
+ Name: "getmyip_hits",
+ Help: "Number of hits in the geolocation service",
+},
+ []string{"country"},
+)