This set of commits tries to mirror the graphite stats as a /prometheus endpoint on the API webserver. Prometheus likes to call this directly instrumentated software.
Things I'd like to fix before a merge is
But to get a general idea about if I'm solving this the correct way I'm creating the PR now.
To be clear: prometheus stats don't necessarily need a TYPE or HELP string but aids end users. Giving them the same name and structure should keep you from having to maintain 3 different branches where they're used, iiuc.