diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-03-25 18:57:41 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2020-03-26 17:09:43 +0100 |
commit | 9cad6ad4aebb3f41918ba6738fe0c85c1bf818b3 (patch) | |
tree | 9b92c42cd70c0c4814d57851ab175f60f3543a92 /metrics.go | |
parent | a9db940ca8187514f49f6c456df760744e503482 (diff) |
[feat] add prometheus metrics for country
Diffstat (limited to 'metrics.go')
-rw-r--r-- | metrics.go | 13 |
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"}, +) |