mrd0ll4r / chihaya-privtrak-middleware

A private tracker middleware for the chihaya BitTorrent tracker
MIT License
9 stars 1 forks source link

Add additional Prometheus metrics within privtrak #3

Open ipsrt opened 5 years ago

ipsrt commented 5 years ago

There's some metrics that might be useful, and it's a good place to measure them from within an unlocked shard. So far the only one I think would be worth including by default is the total traffic up & down. Rather than two seperate counters there could be a single 'traffic' counter with 'up' & 'down' labels.

Also the names of the existing metrics for GC time and total users tracked don't conform with the Prometheus best practices for naming: GC time should be measured in seconds rather than ms, and the users name should end with 'total' rather than 'count'. Not sure if that's something you're interested in changing, its just for consistency with metrics from other applications.

mrd0ll4r commented 5 years ago

Also the names of the existing metrics for GC time and total users tracked don't conform with the Prometheus best practices for naming

Oh, nice! I didn't know about that, just took the naming scheme from Chihaya. Yes, I'd be interested in conforming with the best standards :)

About the total traffic up/down stats: We can try it out, sure, please find an appropriate place to modify them. Should be interesting to see if they add up to zero most of the time :)