Gem Version Build Status Code Climate Test Coverage Dependency Status Inline docs


Part of TrackerHub, Request is a gem tracking every requests on the backend side. Some keys will be filtered and the request data will finally be saved into a logfile. This logfile will be automatically managed and rotated by the logging gem.


Add this line to your application's Gemfile:

gem 'tracker_hub-request'

And then execute:

$ bundle

Configuration (optional)

In an initializer, you can configure the tracker:

# ./config/initializers/request_tracker.rb
TrackerHub::Request.setup do |config|
  config.app_version   = '1.0'
  config.required_keys = %w(my rack env keys to log)
  config.logger        ='requests.log')
  config.notification  ='my_token', 'my_room', 'my_username'))


  • logger

Here you can define your own configured logger. The default logger is logging. Feel free to add your own, or use another gem!

  • notification

If an error occure, it will be catched and a notification will be sent to the service of your choice. The list of available services are defined here.


Add the middleware to your environment:

config.middleware.insert_after ActionDispatch::DebugExceptions, TrackerHub::Request::Middleware

Activate the TrackerHub by adding to your environment (or .env):

$ TRACKER=true

Get your request logs:

$ tail -f ./log/tracker/requests.log

Running tests

To run tests:

$ bundle exec rake spec


Bug reports and pull request are welcome on GitHub at This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


The gem is available as open source under the terms of the MIT License.