miekg / caddy-prometheus

Prometheus metrics middleware for caddy
Apache License 2.0
65 stars 26 forks source link

Export user agent? #34

Open OmgImAlexis opened 6 years ago

OmgImAlexis commented 6 years ago

Could you possibly add the user agent to the exported data?

miekg commented 6 years ago

[ Quoting notifications@github.com in "[miekg/caddy-prometheus] Export use..." ]

Could you possibly add the user agent to the exported data?

the cardinality of that data is too big to be properly exported - if you can access it in the first place.

OmgImAlexis commented 6 years ago

I'm not sure what you mean?

I'm mainly wanting this for my API servers that accept connections from known clients. Each using appname v1.0.0 for example. I'm mainly trying to see how many people are on what version and I don't have a clue when it comes to Go otherwise I would have forked and added my own code.

OmgImAlexis commented 6 years ago

What about adding the user agent as a label to each request?

ptman commented 6 years ago

So you want stats on what clients are used to access? I think log parsing is a better idea. As @miekg said, the problem is with the amount of different user agents in the wild. Or handle user-agent header in your API servers.