Prometheus metrics for memory usage in bytes

Moved from GitHub ristretto/140

Posted by bzon:

It would be really helpful if we expose this as a Prometheus metric.

martinmr commented :

Yeah, not a bad idea to have the option to export this metric (and probably all the other ones) integrated with Prometheus. I’ll look into it.

bzon commented :

Cool! Probably look up opencensus (soon to be opentelemetry) so tracing can be enabled as well.

If the Cache can be an interface, then it would be easier to just instrument metrics at the middleware level.