Prometheus.io Ecto Instrumenter
Ecto integration for Prometheus.ex
Quickstart
- Define your instrumenter:
defmodule MyApp.Repo.Instrumenter do
use Prometheus.EctoInstrumenter
end-
Call
MyApp.Repo.Instrumenter.setup/0when application starts (e.g. supervisor setup):
MyApp.Repo.Instrumenter.setup()-
Add
MyApp.Repo.Instrumenterto Repo loggers list:
config :myapp, MyApp.Repo,
...
loggers: [MyApp.Repo.Instrumenter, Ecto.LogEntry]
...Integrations / Collectors / Instrumenters
- Ecto collector
- Plugs Instrumenter/Exporter
- Elli middleware
- Fuse plugin
- Phoenix instrumenter
- Process Info Collector
- RabbitMQ Exporter
Installation
Available in Hex, the package can be installed as:
-
Add
prometheus_ectoto your list of dependencies inmix.exs:
```elixir
def deps do
[{:prometheus_ecto, "~> 1.0.0-alpha4"}]
end
```-
Ensure
prometheus_ectois started before your application:
```elixir
def application do
[applications: [:prometheus_ecto]]
end
```