hopla
1
hello,
I would like to keep track of KV usage per key. is there a way to get the read/write/request stats per key?
I don’t want to add a counter to my worker, because it will result in a write on every read, which will defeat the purpose.
I found: Cloudflare API v4 Documentation but it seems to only give results per account.
Is there a way to get these stats when using the LIST command, for example?
thanks!
There’s no good way to do that today, I’m afraid.
gr2m
3
Hey Steve, are there any plans to add more detailed KV stats?
Not in the immediate future, but if there’s demand, it might be something we’d be interested in investigating.
hopla
5
UPDATE: we went ahead and pushed a pageview to Google Analytics on every READ with the kv as ID. We now have a beautiful Dashboard 
GA even has a REST API to query these stats per id back into your application…
2 Likes
thomas4
6
Keep in mind that you’ll likely get rate-limited if the writes keep coming from the same single IP.
+1 on this feature. It would open up a range of possibilities for rolling your own analytics.