Code Monkey home page Code Monkey logo

rheostat's Introduction

Rheostat

A confugurable stats reporter.

Rheostat has the same functional interface as Metrix and Statix and includes adapters for each.

Rheostat can be configured to use one or the other (or any other adapter you want to configure).

Metrix is good for logdrain style metrics. Statix is good for StatsD metrics.

The latter means it works great with DataDog through the DataDog Heroku buildpack.

Installation

def deps do
  [
    {:rheostat, "~> 0.1.0"},
  ]
end

Configuration

The most common way to use Rheostat is to configure it to use Metrix in the dev and test profiles and to use Statix in prod.

# dev, test
config :metrix,
  prefix: "my-app."

config :rheostat, adapter: Rheostat.Adapter.Metrix
# prod
config :statix,
  prefix: "my-app"

config :rheostat, adapter: Rheostat.Adapter.Statix

The Metrix adapter is also the default.

Finally, the Statix addapter requires initialization, so add this to your application start:

  def start(_type, _args) do
    :ok = Rheostat.connect()
  end

Usage

Because Rheostat has the same function interface as Metrix you can replace:

  import Metrix

with:

  import Rheostat

Or globaly replace Metrix with Rheostat.

There may be other more clever ways to do that as well.

rheostat's People

Contributors

fatcatt316 avatar hdeters avatar

Watchers

 avatar

rheostat's Issues

First commit review

@duff @dtykocki

I extracted the module from S3PO into this repo.

There might be a better way to approach this, but wanted to get some (more) feedback. It should do the same thing as what we talked about yesterday.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.