https://github.com/remind101/heroku-kit
An opinionated collection of middleware for Ruby apps running on Heroku.
https://github.com/remind101/heroku-kit
Last synced: about 1 year ago
JSON representation
An opinionated collection of middleware for Ruby apps running on Heroku.
- Host: GitHub
- URL: https://github.com/remind101/heroku-kit
- Owner: remind101
- License: mit
- Created: 2013-09-14T02:19:30.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-19T01:12:54.000Z (almost 13 years ago)
- Last Synced: 2025-02-28T00:55:52.711Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 98
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Heroku Kit
An opinionated collection of middleware, utilities and best practives for
[12factor](http://12factor.net) Ruby apps running on Heroku.
* [rack-timeout](https://github.com/kch/rack-timeout) for timing out long
running requests.
* [formatted-metrics](https://github.com/remind101/formatted-metrics) for logging metrics to STDOUT
for consumption by [l2met](https://github.com/ryandotsmith/l2met).
* [collective](https://github.com/remind101/collective) for collecting metrics from services.
* [request\_id](https://github.com/remind101/request_id) for tracing request\_id's through systems.
* [rails\_12factor](https://github.com/remind101/rails_12factor) for enabling
STDOUT logging and static asset serving in production.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'heroku-kit', github: 'remind101/heroku-kit'
```
## Usage
First, ensure that you have the http-request-id and log-runtime-metrics labs
features enabled:
```bash
heroku labs:enable http-request-id
heroku labs:enable log-runtime-metrics
```
### Rails
You're done!
### Rack
Add the middlewares:
```ruby
use Rack::Timeout
use Rack::RequestId
use Rack::Instrumentation
```
Configure your logger:
```ruby
App.logger = Heroku::Kit::Logger.new
```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request