PromEx.Plugins.Ecto (PromEx v0.1.10-alpha) View Source

This plugin captures metrics emitted by Ecto.

This plugin supports the following options:

  • otp_app: This is a REQUIRED option and is the name of you application in snake case (e.g. :my_cool_app).

  • repo: This is an OPTIONAL option and is a list with the full module name of your Ecto R epos (e.g [MyApp.Repo]). If you do not provide this value, PromEx will attempt to resolve your Repo modules via the :ecto_repos configuration on your OTP app.

This plugin exposes the following metric groups:

  • :ecto_init_event_metrics
  • :ecto_query_event_metrics

To use plugin in your application, add the following to your PromEx module plugins/0 function:

def plugins do
  [
    ...

    {PromEx.Plugins.Ecto, otp_app: :web_app, repos: [WebApp.Repo]}
  ]
end