This is Rack middleware that sends request/response data to Honeycomb. You can use Rack::Honeycomb
with any Ruby web framework based on Rack, including Ruby on Rails and Sinatra.
For more information about using Honeycomb, check out our docs and our Ruby SDK.
# config/application.rb
require 'rack/honeycomb'
class Application < Rails::Application
config.middleware.use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
end
#!/usr/bin/env ruby -rubygems
require 'sinatra'
require 'rack/honeycomb'
use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
get('/hello') { "Hello, world!\n" }
To install the latest stable release of rack-honeycomb
, simply:
$ gem install rack-honeycomb
or add this to your Gemfile
gem "rack-honeycomb"
To follow the bleeding edge, it's easy to track the git repo:
gem "rack-honeycomb", :git => "https://github.com/honeycombio/rack-honeycomb.git"
Features, bug fixes and other changes are gladly accepted. Please open issues or a pull request with your change. Remember to add your name to the CONTRIBUTORS file!
All contributions will be released under the Apache License 2.0.
Travis will automatically upload tagged releases to Rubygems. To release a new version, run
bump patch --tag # Or bump minor --tag, etc.
git push --follow-tags