Simple tracking and metrics for your business processes in real-time
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin ii Dec 1, 2012
Gemfile ii Dec 1, 2012


Roundtrip is a business process tracking and measurement service especially useful for tracking distributed systems and services.

For a simple and useful explanation, check out this blog post before you start.

I recently watched and recommend watching Ruby Monitoring State of the Union by @josephruscio, and felt Roundtrip handles one of the cases he mentioned to be not simple to cover (cross service/process metrics). A very interesting watch regardless.

With it, you can answer these questions, in real-time:

  • How is each part of my processing pipeline performing? How is the entire pipeline performing?
  • What out of my running transactions didn't end? isn't ending within X amount of time?


You have a couple of options of running Roundtrip.


Roundtrip comes with easy heroku integration.

$ git clone git://
$ cd roundtrip
$ bundle install
$ heroku create

Now configure Redis and Statsd through (with Heroku, you can give the free-tier RedisToGo a try).

Next, push to your new Heroku app.

$ git add -f Gemfile.lock
$ git commit -am "this becomes a dedicated web project now"
$ git push heroku master

Clone and run

Roundtrip currently supports HTTP as its RPC mechanism (CLI and 0mq are on the way). This means you can host it using your favorite battle-tested Ruby stack -- anything that can run a Rack application.

$ git clone git://
$ cd roundtrip
$ bundle

Now feel free to edit for Redis and Statsd configuration.

$ bundle exec rackup

Install gem

You can install the roundtrip gem, and then use the web interface within your existing Rack applications (for example, in Rails, you can mount it).

$ gem install roundtrip
require 'roundtrip'
# set up the default Redis and Statsd components
Roundtrip.options[:redis] = { :host  => 'localhost' }
Roundtrip.options[:statsd] = { :host => 'localhost', :port => 8125 }

require 'roundtrip/web'
# now mount/run Roundtrip::Web

API Usage

I'll use curl just for illustration purposes. You should use what ever HTTP library you feel comfertable with, within your code.

For usage examples on various platforms check out /examples.

Supply your own ID

curl -XPOST -d id=id-xyz&route=invoicing http://localhost:9292/trips

Or let roundtrip generate one for you

curl -XPOST -d route=invoicing http://localhost:9292/trips

Using the generated ID, lets add checkpoints:

curl -XPATCH -dcheckpoint=generated.pdf http://localhost:9292/trips/cf1999e8bfbd37963b1f92c527a8748e
curl -XPATCH -dcheckpoint=emailed.customer http://localhost:9292/trips/cf1999e8bfbd37963b1f92c527a8748e

Let's finish this off, don't forget to do something with the JSON you get back.

curl -XDELETE http://localhost:9292/trips/cf1999e8bfbd37963b1f92c527a8748e


Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).


Copyright (c) 2012 Dotan Nahum @jondot. See MIT-LICENSE for further details.