Metairie v0.1.0 Metairie View Source

Modules for monitoring Elixir/Phoenix Apps.

Adds monitoring for Phoenix, Ecto, and the Erlang VM

Configuration

Phoenix Instrumentation

In your configuration for your endpoint, add instrumenters: [Metairie.Phoenix.Instrumenter]:

config :my_app, MyAppWeb.Endpoint,
  # other configuration
  instrumenters: [Metairie.Phoenix.Instrumenter]

Erlang VM Stats

Metaire uses vmstats to track Erlang VM stats. Add the following to your configuration

config(
  :vmstats,
  sink: Metairie.VMStats.Sink,
  base_key: "my_app.erlang",
  key_separator: ".",
  interval: 1_000
)

Statix (sending stats to StatsD/DataDog)

config :my_app, :statix,
  prefix: "my_app",
  host: "localhost",
  port: 8125

Start

Initializes the gathering of metrics in your application by calling Metairie.init(:my_app)

defmodule MyApp.Application do
use Application

  def start(_type, _args) do
    import Supervisor.Spec

    Metairie.init(:my_app)
    ...
  end

Link to this section Summary

Functions

Initializes the gathering of metrics in your application

Link to this section Functions

Initializes the gathering of metrics in your application

Examples

In application

defmodule MyApp.Application do
use Application

  def start(_type, _args) do
    import Supervisor.Spec

    Metairie.init(:my_app)
    ...
  end