Local Metrics Aggregation With Counters
Recently I needed to get a better picture of how my application’s database connection pool was doing, but there was a bit of a hitch. DBConnection has a highly optimized queuing algorithm, but the downside of that optimization is that you can’t get an accurate picture of the number of idle and busy connections in the pool at any given time like you can with Poolboy. But we can use some telemetry events to get this information, with just a little bit of extra code to avoid adding a performance bottleneck to our applications!
http://devonestes.com/local-metrics-aggregation-with-counters
Read next Developing with Elixir/OTP Course Review