No commit activity in last 3 years
No release in over 3 years
Simple Rack middleware to log the heroku request id and write it to the end of html requests. Both optionally, of course.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
 Project Readme

HerokuRequestId

Simple Rack middleware to log the heroku request id and write it to the end of html requests. Both optionally, of course.

Gem Version Build Status Code Climate Coverage Status Dependency Status

Installation

Add this line to your application's Gemfile:

gem 'heroku-request-id'

And then execute:

$ bundle

Or install it yourself as:

$ gem install heroku-request-id

Usage

By default the gem will print a log line to the Heroku logs containing the request id and the elapsed time taken processing the request. You can disable the log line by putting this in an initializer.

  HerokuRequestId::Middleware.log_line = false

You can configure the gem to add a comment to the beginning of html requests by adding this to an initializer.

  HerokuRequestId::Middleware.html_comment = true

You can also configure the gem to copy the HTTP_HEROKU_REQUEST_ID header, which is set by heroku, into the HTTP_X_REQUEST_ID header, which is used by ActionDispatch:: RequestId.

  HerokuRequestId::Middleware.x_request_id_replication = true

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