No commit activity in last 3 years
No release in over 3 years
A simple rack app wrapper that gathers request metrics using Coda Hale's metrics library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.6.4
>= 0

Runtime

~> 1.1
 Project Readme

jruby-rack-metrics

This is a simple rack middleware that gathers metrics for the individual uri's served by the wrapped application. It uses Coda Hale's metrics library and thus requires jruby.

Usage

Install it e.g. with bundler by adding it to your Gemfile file:

source 'http://rubygems.org'
gem 'sinatra'
gem 'jruby-rack-metrics', '= 0.0.1', :git => "git://github.com/tomdz/jruby-rack-metrics.git"

and then run bundler:

$ bundle install

Now you can use it like so in a Sinatra app:

require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'jruby-rack-metrics'

set :environment, :production
use JrubyRackMetrics::Monitor, { :app_name => "HelloWorld", :jmx_enabled => true }

get "/" do
  "Hello World"
end

Requirements

Requires Rack and JRuby. It also needs the core metrics library jar in the classpath (it doesn't bundle it at the moment).

Author

Original author: Thomas Dudziak

License

Apache License version 2.0. See the LICENSE.txt file for the full license.