Name: rack-honeycomb
Owner: Honeycomb
Description: Rack middleware for logging request data to Honeycomb.
Created: 2016-11-17 21:49:40.0
Updated: 2018-05-24 05:25:15.0
Pushed: 2018-05-24 05:25:13.0
Homepage: http://rubygems.org/gems/rack-honeycomb
Size: 56
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
Attaching the middleware is simple. Inside handlers, you also have the choice of attaching custom fields to be added to the events sent to Honeycomb.
sr/bin/env ruby -rubygems
ire 'sinatra'
ire 'rack/honeycomb'
Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
'/hello') do
ck::Honeycomb.add_field :greeting, 'hello'
ello, world!\n"
For more fully-featured Rails support, see honeycomb-rails.
If honeycomb-rails doesn't work for you, this Rack middleware should work for Rails apps too:
nfig/application.rb
ire 'rack/honeycomb'
s Application < Rails::Application
nfig.middleware.use Rack::Honeycomb::Middleware, writekey: "<YOUR WRITEKEY HERE>", dataset: "<YOUR DATASET NAME HERE>"
To install the latest stable release of rack-honeycomb
, simply:
m install rack-honeycomb
or add this to your Gemfile
"rack-honeycomb"
To follow the bleeding edge, it's easy to track the git repo:
"rack-honeycomb", :git => "https://github.com/honeycombio/rack-honeycomb.git"
See rubydoc for gem documentation.
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
patch --tag # Or bump minor --tag, etc.
push --follow-tags