Search⌘ K

Instrumenting Ecto

Explore how to instrument Ecto in Elixir applications to capture detailed database metrics. Understand using Ecto's logging API to monitor query performance and resource usage, helping you optimize and maintain distributed web apps effectively.

We'll cover the following...

The metrics in the virtual machine are important building blocks, but they do not always tell what we need to know about the rest of our application. Moving up one level, let’s learn how to get data from the database layer. While you might find it comforting that the metrics system will tell us when our database queries are waiting for more than a second in the connection pool queue, it is better to know this will happen before we ever put the system into production. Ecto is the best place to start. To get detailed metrics, hook into the Ecto logging API. Let’s see how that works ...