Skylight metrics support for Grape.
Add this line to your application's Gemfile:
gem 'grape-skylight'
Or install:
gem install grape-skylight
You can include it in your API like this:
class TestAPI < Grape::API
use Skylight::Grape::Middleware
get '/hello/:name' do
"Hello #{params[:name]}!"
end
end
If you're mounting inside a Rails application, this is all you need to do.
Otherwise, you'll need to ensure Skylight.start!
is called and you've run
through the other configuration mentioned in the Agent docs.
- Fork it ( https://github.com/nickcharlton/grape-skylight/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Copyright Nick Charlton 2015. nick@nickcharlton.net.