Add some prometheus gauges to the metrics collection that track lifetime usage.
This can be done by querying the sqlite db in a guagefunc:
select count(*) from credential_events where operator_type = 0; -> times access granted to RP NOs
select count(*) from credential_events where operator_type = 1; -> times access granted to solo stakers
we can sum these in grafana for a third (total), so no need to independently add it as a metric.
We should also count distinct node ids for each type for a "total lifetime users" gauge.
Add some prometheus gauges to the metrics collection that track lifetime usage.
This can be done by querying the sqlite db in a guagefunc:
select count(*) from credential_events where operator_type = 0;-> times access granted to RP NOsselect count(*) from credential_events where operator_type = 1;-> times access granted to solo stakerswe can sum these in grafana for a third (total), so no need to independently add it as a metric.
We should also count distinct node ids for each type for a "total lifetime users" gauge.