DogStat

Deps Status Hex.pm Downloads Latest Version License Build Status Coverage Status Ebert

This package is based on Statix with one major difference - it receives settings when on GenServer init, allowing to use packages like Confex to resolve configuration from environment at start-time.

Installation

The package can be installed as:

  1. Add dogstat to your list of dependencies in mix.exs:

    def deps do
      [{:dogstat, "~> 0.1.0"}]
    end
  2. Ensure dogstat is started before your application:

    def application do
      [applications: [:dogstat]]
    end
  3. Add it to your supervision tree:

    def start(_type, _args) do
      import Supervisor.Spec, warn: false
    
      config = [
        host: "localhost",
        port: 8125
      ]
    
      children = [
        ...
        worker(Annon.Monitoring.MetricsCollector, [config]),
        ...
      ]
    
      opts = [strategy: :one_for_one, name: Annon.Supervisor]
      Supervisor.start_link(children, opts)
    end

Docs

The docs can be found at https://hexdocs.pm/dogstat

License

See LICENSE.md.