Skip to content

pro-football-focus/metrex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metrex

Elixir metric library for collection of custom application performance metrics.

Installation

The package can be installed as:

  1. Add metrex to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:metrex, github: "pro-football-focus/metrex", tag: "0.2.0"}]
end
```
  1. Ensure metrex is started before your application:
```elixir
def application do
  [applications: [:metrex]]
end
```
  1. Add metrex Ecto query hook to config/config.exs:
```elixir
config :app, App.Repo,
  loggers: [
    {Ecto.LogEntry, :log, []},
    {Metrex.EctoLogger, :log, []}
  ]
```
  1. Add metrex connection plug to lib/app/endpoint.ex:
```elixir
plug Metrex.Plug
```
  1. Configure ex_statsd connection in your environment file:
```elixir
config :ex_statsd,
  host: "dockerhost",
  port: 8125,
  namespace: "app"
```

About

Elixir metric library for collection of custom application performance metrics.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •