Git Product home page Git Product logo

sinatra-statsd's Introduction

Running a StatsD embedded in a Ruby app on Heroku

Inspired by a post on combining a Python app with StatsD, extended for Ruby and to export data directly to Librato.

Setup

Clone and deploy to a Heroku app, then add the multi buildpack:

  • hk set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git

Add the Librato addon (minimum paid level - $19 - is required to track custom metrics):

  • hk addon-add librato:nickel

That's it.

The StatsD configuration is pre-setup to extract the Librato credentials from the environment.

Details

The app uses the multi buildpack to install and run both the buildpack for Ruby and Node.js. The latter will automatically pick up the package.json included in the project.

To run both processes at the same time the Procfile runs foreman with another Procfile which contains both the statsd instance and the web process.

StatsD will end up running on localhost:8125 inside the dyno.

sinatra-statsd's People

Contributors

roidrage avatar

Stargazers

Kyle Tolle avatar Mike Morris avatar Jose Muñoz avatar Bryan FRIMIN avatar Tyler Montgomery avatar Gabriel Chaney avatar Rafael Jesus avatar Angus H. avatar Claudio Ortolina avatar Derek Gottlieb avatar Jonnie Hallman avatar mark olson avatar Pedro Giménez avatar Simon Rozet avatar Nikhil Krishna avatar Zhao Xiaohong avatar Norbert Crombach avatar Luke Chamberlain avatar Julien Blanchard avatar Steve Agalloco avatar Konstantin Haase avatar Gosha Spark avatar Yannick Schutz avatar Damien Mathieu avatar

Watchers

 avatar James Cloos avatar  avatar

sinatra-statsd's Issues

Can you explain the rationale behind the "double Procfile" approach?

Hey there - thanks for this sample, which we are using right now 😄

I'm just wondering what led you to use a main Procfile which delegates to Procfile.procfile.

My hypothesis is that you are maybe doing this to make sure statsd will be stopped "decently" to let it flush the remaining data, if any.

Is that the explanation?

Let me know @roidrage, happy to provide a PR to clarify this point once I have your reply.

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.