Command use count reset by restart of bot
Currently, when I restart a bot the command count is reset which is the defined behaviour.
However is there a way to make the logs for command count persistent or rather incremental?
I sometimes need to restart the whole bot and these metrics just disappear.
I can always just store the command count in my file but I was wondering if you knew about something that would made it easier or rather native to the prometheus.
Maybe it would be good to have different metrics for all-time command use and since boot?
I'm not sure how to approach this, that sounds like a case for an analytical database more than system metrics, Prometheus isn't designed for persistence. Personally I'd like to see how many commands the bot handled before a crash for example.
We could have an option for an initial command count in the class if that's preferred. Let me know :)
Yeah well, I was experimenting a lot with it and got it to somehow show something to have at least some idea. Not sure how accurate this is, use on your own danger :).
sum(increase(discord_event_on_interaction_total{job=~"$job", command!="None"}[$__range])+1)
But it's better than creating a whole database just for counting the commands.