Skip to content

greenbits/rack-honeycomb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honeycomb middleware for Rack applications

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.

Adding instrumentation to a Rails application

# 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

Adding instrumentation to a Sinatra application

#!/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" }

Installation

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"

Contributions

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.

Releasing a new version

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

About

Rack middleware for logging request data to Honeycomb.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%