Elixir metric library for collection of custom application performance metrics.
The package can be installed as:
- Add
metrexto your list of dependencies inmix.exs:
```elixir
def deps do
[{:metrex, github: "pro-football-focus/metrex", tag: "0.2.0"}]
end
```
- Ensure
metrexis started before your application:
```elixir
def application do
[applications: [:metrex]]
end
```
- Add
metrexEcto query hook to config/config.exs:
```elixir
config :app, App.Repo,
loggers: [
{Ecto.LogEntry, :log, []},
{Metrex.EctoLogger, :log, []}
]
```
- Add
metrexconnection plug to lib/app/endpoint.ex:
```elixir
plug Metrex.Plug
```
- Configure
ex_statsdconnection in your environment file:
```elixir
config :ex_statsd,
host: "dockerhost",
port: 8125,
namespace: "app"
```