This repository demonstrates a potential implementation of custom Prometheus metrics for Go applications as well as the usage in a middleware setup.
Note: This is just an example, you should probably tailor this to your needs before lunching it in production 😉