...
However, I have developed a middleware for Swift called 'swift_usage' (git repo) that exposes the Swift usage for accounts as a REST API. This was developed to be used with my auth middlewares, so that has been tested. I have not touched this project in quite a while and it was only used by a small group of us, so I need to do a once over on the project to make it 'open source' ready. I need to do a bit of a code cleanup and provide much better documentation, but the core is a working product already. We will be using this project internally, so expect some updates soon.
'swift_usage' depends on the 'slogging' Swift middleware. 'swift_logging' just exposes the usage data collected by 'slogging' and exposes it as a REST API. 'slogging' is not an entirely obvious piece of software and it creates many different types of logs. Here is a summary of some of my notes on 'slogging'.