I'm trying to count the number of unique URI's and keep a count of them. These URI's change over time and there can be multiple URIs of the same type. For example, there can be multiple "/foo" and "/bar" and a new URI can come in - lets say "pooh" - and I've to add them to the counter and keep count. In this case, I cannot use constant labels. For instance, if I were to count the number of http requests by method and/or status code, I can do this:
httpRequestInfo := prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "http_requests_sum",
ConstLabels: prometheus.Labels{"component": "foo"},
Help: " A Counter of the number of each type of request by status code and method",
},
[]string{"code", "method"},
)
How could I use counters in this scenario? Thanks!